Commit Graph
3 Commits
Author SHA1 Message Date
Lauri Ojansivu 030c8c524c Update five guards for this round's deliberate changes.
The full node suite run found them; each guard keeps its assertion and
says why it changed:

- boardPermission lists ActivityPub's public-only check (#4198): only a
  public board is a fediverse actor, never an instance board.
- cardSectionCollapse reads the End date item to the next template, and
  cardTitleEditClose lets the close anchor carry attributes: the #337
  titles moved the icon past a fixed window and a bare-anchor pattern.
- oidcAutoRedirectLoop's harness provides FlowRouter, which the sign-in
  page's onCreated now reads for SQRL's one-time sign-in (#2460).
- sharedDescription's own whole-tree check skips every _build* directory,
  rspack's bundled copy of every file.

Thanks to xet7 !
2026-10-14 17:22:39 +03:00
Lauri Ojansivu 8263734f5a Prevent repeated automatic OIDC login after failed callbacks
Keep the redirect guard after failed login attempts, require writable session storage, and recheck login state after the asynchronous settings request. Cover callback reloads, failures, storage restrictions and delayed responses.

Thanks to Alishara and xet7 !

Fixes #6722,
2026-09-25 12:39:19 +03:00
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