Skip to content
Snippets Groups Projects

auth-keycloak: make sure the token is always valid for at least 20 seconds

Merged Reiter, Christoph requested to merge auth-token-refresh into master

The keycloak library currently only sends us an event in case the token is about to expire, which is problematic because there is a time window where we don't have a new token yet and on mobile the timers used might be suspended and come too late.

To avoid this we check every 10 seconds that the token is valid for 30 and to work around suspended timers we also check on "visibilitychange" which should trigger then the website gets visible again after the browser sleeps.

Merge request reports

Pipeline #14089 passed

Pipeline passed for 74444969 on auth-token-refresh

Merged by Reiter, ChristophReiter, Christoph 4 years ago (Nov 11, 2020 12:42pm UTC)

Loading

Pipeline #14109 passed

Pipeline passed for 6e2e7457 on master

Deployed to dep‎loy‎ 2 years ago
Failed to deploy to devel‎opment‎

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading