Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: failed update refresh should redirect to login#9442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 8 commits intomainfromstevenmasley/expire_refresh
Aug 30, 2023

Conversation

Emyrk
Copy link
Member

Our redirect to login was not happening on all 401 errors. I corrected this on the FE and fixed 2 places where we should return aForbidden vsUnauthorized.

Closeshttps://github.com/coder/v2-customers/issues/280

Copy link
Member

@aslilacaslilac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is a great little bit of cleanup 💕

@@ -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.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

How will they reauthenticate other than manually wiping their cookies?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The frontend will intercept the "Unauthorized" status code and redirect to the login page. They shouldn't ever even see this message.

If they're using the CLI, they can just runcoder login again.

Emyrk reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Oh, duh lol

@EmyrkEmyrk merged commite827278 intomainAug 30, 2023
@EmyrkEmyrk deleted the stevenmasley/expire_refresh branchAugust 30, 2023 21:14
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 30, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@aslilacaslilacaslilac approved these changes

@deansheatherdeansheatherdeansheather approved these changes

Assignees

@EmyrkEmyrk

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@Emyrk@aslilac@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp