PAB-25: scope Nevermind auth by backend origin#106
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
pablopunk
force-pushed
the
agent/coder/9b7938af
branch
from
July 12, 2026 16:46
6a4d089 to
cd30a1a
Compare
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.
This PR scopes Nevermind authentication credentials by backend origin, allowing each backend environment (e.g., production, preview, custom) to maintain its own independent auth snapshot rather than sharing a single global credential.
Key changes:
Per-origin auth storage: Auth credentials are now stored in a new
nevermind-auth-by-origin.jsonfile that maps each backend base URL to its ownStoredAuthentry, replacing the previous single-snapshotnevermind-auth.jsonfile.Active origin tracking: A new
setActiveNevermindAuthBaseUrlfunction sets the currently active backend origin. All auth reads, writes, and clears are scoped to that origin. The main process calls this function on startup, during sign-in, deep-link auth, environment switches, and whenever the active base URL changes.Legacy migration: On first read, if the new per-origin store is empty and a legacy single-auth file exists, it is automatically migrated into the new store format and the old file is renamed to
.bak. Corrupt legacy files are left untouched.Selective sign-out:
clearNevermindAuthnow removes only the active origin's entry from the store instead of deleting the entire auth file, preserving credentials for other backends.Backend switching: Switching backend environments no longer unconditionally signs out and re-signs in. Instead, it reuses existing stored credentials for the target origin if available, only prompting a fresh sign-in when no credentials exist for that origin.
Tests: New test suite covering legacy migration, corrupt file handling, migration idempotency, and per-origin credential isolation.