Skip to content

bug: A lot of parallel refresh token request with SSO Keycloak configuration #25275

Description

@ZeroEP

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Hello!

We are integrating Keycloak SSO with Coder and have encountered an issue where, upon access token expiration, refreshing the page triggers multiple parallel refresh token requests to Keycloak (typically between 2 to 5 requests). This behavior puts unnecessary load on our Keycloak server and could lead to rate limiting or performance degradation under high concurrency.

For test we set access token lifespan in 2 minutes

Image Image

Relevant Log Output

Expected Behavior

Expected behavior is one refresh token request on expire access token

Steps to Reproduce

  1. Configure Coder with Keycloak SSO
  2. Login with Keycloak
  3. Wait until the access token expires
  4. Refresh the page in the browser.
  5. Check event user in selected realm in Keycloak as Keycloak admin
  6. We get a lot of async request from backend to Keycloak

Environment

  • Coder version: 2.29.6

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions