fix(auth): normalize trailing slashes in auth login URLs#15874
Merged
thdxr merged 1 commit intoanomalyco:devfrom Mar 3, 2026
Merged
fix(auth): normalize trailing slashes in auth login URLs#15874thdxr merged 1 commit intoanomalyco:devfrom
thdxr merged 1 commit intoanomalyco:devfrom
Conversation
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
31671d5 to
ed33e38
Compare
Grappeggia
pushed a commit
to teamslop/slopcode
that referenced
this pull request
Mar 4, 2026
praxstack
pushed a commit
to praxstack/opencode
that referenced
this pull request
Mar 5, 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.
Issue for this PR
Closes #15873
Type of change
What does this PR do?
opencode auth login https://opencode.cloudflare.dev/andopencode auth login https://opencode.cloudflare.devstore separate entries inauth.json— the URL is used as the cache key verbatim. The trailing-slash variant also produceshttps://opencode.cloudflare.dev//.well-known/opencodeduring fetch.Auth.setandAuth.removeso all callers (CLI, server API) normalize automaticallyAuth.setalso deletes any pre-existing trailing-slash variant, cleaning up stale entries from before the fixAuth.removedeletes both the raw and normalized key so logout works regardless of form${url}/.well-known/opencode)How did you verify your code works?
Auth.set/Auth.removenormalization — no mocks, real I/O against a tempauth.json.well-knownfetch URLsbun run typecheckand existing test suite passScreenshots / recordings
N/A — no UI changes.
Checklist