feat(KLEF): Add loading spiner, oidc session fix between oidc switch#19
Merged
isaacwallace123 merged 1 commit intomainfrom Apr 7, 2026
Merged
Conversation
isaacwallace123
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Summary
cache: "no-store"tofetchAuthConfigto ensure the browser never serves a cached IDP config after switching providersRelated Issues
Closes #
Changes
What's Included
store-tokens.ts: addsclearStoredSession()— removes alloidc.user:*keys from localStorage before IDP-switch redirectsindex.ts(auth feature): exportsclearStoredSessionapi/index.ts(auth feature):fetch("/api/v1/auth/config", { cache: "no-store" })— prevents browser caching a stale IDP configprovider.tsx: pollsGET /api/v1/auth/configevery 3 s whenenabled && !ready; skips creatingOidcProvideruntilready: truelogin/page.tsx: renders a spinner whenenabled && !ready(IDP plugin starting) instead of the login formmarketplace/page.tsx:openActivatealways opens the config sheet (previously skipped it for plugins with no required fields); distinguishes already-installed vs. fresh-install inhandleConfigSubmit; callsclearStoredSession+broadcastSignoutbefore redirecting to/auth/loginafter IDP switchsetup/page.tsx: clearsoidc.user:*localStorage keys before redirecting to/auth/loginafter initial setup installWhat's Not Included
Testing
How Was This Tested?
Test Coverage
Breaking Changes
Does this PR introduce breaking changes?
Security Considerations
clearStoredSession()removes stale access/refresh/id tokens from localStorage on IDP switch, preventing a previous session from auto-authenticating with the wrong identity.cache: "no-store"on the config endpoint prevents a cached config with a different IDP's authority from being used after switching.Documentation
Does this PR require documentation updates?
UI/UX (If Applicable)
Login page now has a "Starting identity provider…" spinner state. Marketplace config sheet is always shown on Activate.
Screenshots or recordings: (see PR description above)
Pre-Merge Checklist
fix: show spinner while IDP starts, fix stale session on IDP switch)Reviewer Notes