Skip to content

Sign-out no longer triggers consistently on all open tabs to end session #49

Open
@martyngroberts

Description

@martyngroberts

It is observed that if a user has two authenticated sessions running on separate tabs for an app integrated with Angular SDK (3.2.0), logging out will not consistently end the session correctly on the other tab. On some occasions the other tab will not detect the logout and on other occasions the page reload happens quicker than the first tab completing logout and access token is actually renewed, keeping session alive in both tabs.

This has been verified using the following;

  • sample app for SPA (using OIDC PKCE flow)
  • Angular SDK 3.2.0
  • "okta hosted login" flow to hosted signin widget
  • "offline_access" and refresh token rotation in place

Steps to recreate

  1. Open browser tab and sign into demo app (via redirect to hosted signin page and back)
  2. Open second tab and sign into demo app (picks up existing session)
  3. Click logout.

Repeat this process multiple times. One of three outcomes happens inconsistently, suggesting race condition;

  1. Both apps are logged out and return to default public route
  2. One app logs out however other app does not refresh (however interaction shows that app is signed out)
  3. One app logs out however refresh on other tab happened sooner and actually refreshes the access token

Note that this behaviour has also been observed by another team who implemented the SDK, here is a video

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions