Skip to content

Expired access tokens are not renewed when network is offline #2128

@Cassolette

Description

@Cassolette

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

User gets logged out due to a failed attempt at token renewal. This can fail often due to prolonged network interruption (e.g. no internet / device woke up from standby mode)

Reproduction Steps

Environment -> OpenCloud compose with keycloak enabled

  1. To easily simulate for testing a prolonged downtime exceeding the access token lifespan (default of 5 minutes), we reduce accessTokenLifespan to an extremely low value of 3 seconds (Keycloak Admin -> OC realm -> Realm settings -> Tokens -> Access Token Lifespan).
  2. Stay logged in the web UI
  3. Start observing UI behaviour
  4. Turn WiFi off / Put device to standby mode (simulate >3s downtime)
  5. Turn WiFi back on / wake deviece (do not take too long to turn it back on though, it needs to be before ssoSessionIdleTimeout which defaults to 30 minutes)
  6. Observe UI behaviour

Expected Outcome

Ideally resume UI state as observed from step 3 (silent signin), or at least redirected to IDP/keycloak sign in. User could already be authenticated in the IDP

Actual Outcome

User is forced to be logged out because of the silent signin failure, affecting UX and possibly discarding their progress

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions