fix: resets basic auth credentials (#1013)#1017
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the auth refresh-token error handling to avoid returning HTTP 401 (which can cause browsers behind a Basic Auth reverse proxy to discard cached credentials), and adds an e2e regression test around that behavior.
Changes:
- Change
POST /api/auth/refresh-tokenmissing/invalid-cookie response from 401 to 422. - Update
authErrorStatusto mapauth_invalid_refresh_tokento 422 (instead of 401). - Add an e2e-proxy test to ensure refresh-token without a session cookie does not return 401.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/wiki/auth/routes.go | Adjusts refresh-token handler to return 422 instead of 401 when refresh cookie is missing/invalid. |
| internal/wiki/auth/errors.go | Changes status mapping for auth_invalid_refresh_token to 422. |
| e2e-proxy/proxy_auth_test.go | Adds an e2e regression test ensuring refresh-token without session cookie doesn’t return 401. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
perber
force-pushed
the
fix/1013-resets-basic-auth-creds
branch
from
May 22, 2026 14:00
b9ffdb4 to
e54f7e1
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.
No description provided.