Repository navigation
Conversation
`bugsplat login` runs the OAuth flow MCP clients use: discovery, dynamic client registration (cached per API URL), PKCE S256 and a loopback callback. `access_token` returns BUGSPLAT_ACCESS_TOKEN, then a token from a Client ID and Client Secret, then the stored session, which it refreshes under a file lock and re-reads first because the server rotates refresh tokens. Sessions live in the OS keychain, one item per API URL, with a 0600 file under the config directory when there is no keychain. BUGSPLAT_TOKEN_STORE (auto, keychain, file) picks the store; debug builds default to the file so tests and rebuilt binaries never touch the developer's keychain. Closes #3 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Merged
Member
Author
|
Closing in favor of #21, which contains this branch together with the other phase 1 streams and the fixes made when they were combined. This pull request's diff is still here for reviewing this stream on its own; the branch is not deleted. |
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.
Adds sign-in to the
bugsplat-authcrate and thelogin,logoutandwhoamicommands: the browser OAuth flow MCP clients use (discovery, dynamic client registration cached per API URL, PKCE S256, loopback callback), refresh under a file lock that re-reads the store first because refresh tokens rotate, client credentials for CI, and session storage in the OS keychain with a0600file fallback, selectable withBUGSPLAT_TOKEN_STORE(debug builds default to the file so tests and rebuilt binaries never touch a developer's keychain). Tested with 51wiremockunit tests and 6 tests of the built binary, plus an ignored end-to-end test that passed against LocalStack (sign-in through the form,whoami, a rotated refresh, two commands refreshing at once, client reuse,logout); the keychain store itself was not run, and nothing was compiled for Linux or Windows.whoamishows the email only when the access token names one, which LocalStack's tokens do not. Closes #3🤖 Generated with Claude Code