mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: failed update refresh should redirect to login (#9442)
* chore: update refresh oauth token message * chore: unauthorized -> forbidden for non authentication failures * redirect to login on all 401 responses * add unit test to verify 401 on expired refresh
This commit is contained in:
@@ -296,7 +296,7 @@ func ExtractAPIKey(rw http.ResponseWriter, r *http.Request, cfg ExtractAPIKeyCon
|
||||
}).Token()
|
||||
if err != nil {
|
||||
return write(http.StatusUnauthorized, codersdk.Response{
|
||||
Message: "Could not refresh expired Oauth token.",
|
||||
Message: "Could not refresh expired Oauth token. Try re-authenticating to resolve this issue.",
|
||||
Detail: err.Error(),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user