Skip to content

feat(auth): let a consumer replace initLogOut and the 401/403 handling - #353

Open
gcutrini wants to merge 2 commits into
feat/access-token-resolver-5xfrom
feat/auth-handlers-5x
Open

gcutrini wants to merge 2 commits into
feat/access-token-resolver-5xfrom
feat/auth-handlers-5x

Conversation

@gcutrini

@gcutrini gcutrini commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

ref: https://app.clickup.com/t/86bbnquuq

5.x sibling of #350 (v4.x). Based on #329 (resolver 5.x).

setAuthHandlers lets a consumer inject initLogOut and the 401/403 handler in one setter: setAuthHandlers({ initLogOut, authErrorHandler }), with getAuthHandlers to read them back. When registered uicore delegates; otherwise the built-in flow is unchanged. Same opt-in shape as setAccessTokenResolver (#329).

setAuthHandlers registers optional replacements: initLogOut for the IDP
end-session redirect, authErrorHandler for the 401 login / 403 logout
paths. The two keys are independent, and without handlers uicore keeps
its built-in behavior.

The handlers live on globalThis under
Symbol.for('openstack-uicore-foundation.authHandlers'), so every copy of
the module shares them.
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dbc4cf67-42c5-494e-a87b-80904a3c6d0f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

setAuthHandlers and readAuthHandlers used bare globalThis. They now use
the _global fallback (globalThis → window → {}) that the resolver already
uses, so initLogOut keeps its built-in redirect on a runtime without
globalThis.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant