Files
wekan/client/lib
Lauri Ojansivu 89682c251f Fix OIDC auto-redirect looping until the provider rate-limits it
With oauth2-login-style redirect and OIDC_REDIRECTION_ENABLED, the browser
looped between WeKan and the identity provider until the provider started
rate-limiting the repeated /authorize requests.

Template.userFormsLayout.onCreated (client/components/main/layouts.js)
fired the auto-redirect unconditionally on every render. Meteor's
redirect-style OAuth has no dedicated callback route - the identity
provider's callback bounces the browser back to this SAME sign-in page -
and the login method that follows a successful callback completes
asynchronously, racing this template's own re-render. When the
auto-redirect check ran before that login had finished, it saw "not
logged in yet" and fired a brand new navigation straight back to the
provider, forever.

Fixed with a one-shot sessionStorage flag (client/lib/oidcAutoRedirect.js)
that survives the full-page round trip to the provider and back, so the
bounce-back render does not re-fire the redirect. Cleared on both login
success and login failure (config/accounts.js), so a later logout, or a
genuine error, can still trigger the auto-redirect again rather than
leaving the sign-in page permanently stuck the other way.

Thanks to Alishara and xet7 !

Fixes #6681,
2026-09-08 17:52:54 +03:00
..
2026-01-28 12:55:22 +02:00
2020-05-24 12:46:39 +02:00
2026-09-06 18:35:33 +03:00
2025-10-21 15:19:19 +03:00
2026-08-28 11:45:50 +03:00
2020-05-24 12:46:39 +02:00