8000 Double click on social provider link causes page has expired error · Issue #35278 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Double click on social provider link causes page has expired error #35278

Closed

Description

@martin-kanis

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

login/ui

Describe the bug

Double click on social provider link causes page has expired error.

The server throws the following error:

ERROR [org.keycloak.services.resources.IdentityBrokerService] (executor-thread-13) unexpectedErrorHandlingRequestMessage: jakarta.ws.rs.WebApplicationException: HTTP 200 OK
	at org.keycloak.services.resources.IdentityBrokerService.parseSessionCode(IdentityBrokerService.java:1161)
	at org.keycloak.services.resources.IdentityBrokerService.performLogin(IdentityBrokerService.java:380)
	at org.keycloak.services.resources.IdentityBrokerService$quarkusrestinvoker$performLogin_639fa76256feb47da66621dcdd20f8de386404c5.invoke(Unknown Source)
	at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
	at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
	at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:635)
	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Version

main

Regression

  • The issue is a regression

Expected behavior

The second click is not possible or is not causing an error

Actual behavior

The second click causes an error

How to Reproduce?

  1. Add a social provider with some random client ID/secret
  2. Quickly double click on the social provider link on the login form
  3. Page has expired error page is shown

Anything else?

No response

Activity

  1. edewit commented on Dec 2, 2024

    @edewit
    Contributor

    why would you double click on links?

  2. self-assigned this
    on Dec 2, 2024
  3. added a commit that references this issue on Dec 2, 2024
    05ac225
  4. athenacykes commented on Dec 2, 2024

    @athenacykes

    why would you double click on links?

    Sometimes the network may be slow and user will be stuck at the login screen while waiting for the redirection. If, before the successful redirection, the user becomes impatient and clicked a second time, it will trigger this bug and it will look like it's Keycloak causing a login error.

    I am the person who reported this issue via RH support. I discovered this behavior when we got reported that Keycloak is having issue while the actual root cause is that there is some network issue on some of our Android-based devices, causing the devices unable to connect to the Social Provider (timed out) and it appears as the device still staying at the login screen after the first click / touch. After the user clicks / touches a second time, it shows "Page has expired" and the redirection attempt is also cancelled.

    Also we were observing logs like this since RH-SSO 7.4 and we opened RH case tickets before and have no luck finding the true root cause. It seems that the double click is the real root cause behind this kind of error logs.

    Ah, and I think that the clicking and touching on a mobile device are different events - we may need to treat them both.

    Edit: Also --- may I know the reason behind why the second click becomes "Page has expired"? Is this by design of how authentication flow works?

  5. removed their assignment
    on Dec 4, 2024
  6. 33 remaining items

  7. added a commit that references this issue on May 6, 2025
    3969c40
  8. added a commit that references this issue on May 7, 2025
    17d8c0b
  9. added a commit that references this issue on May 7, 2025
    6c88e54
  10. added a commit that references this issue on May 7, 2025
    38fe76d
  11. added a commit that references this issue on May 13, 2025
    2c351a3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0