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

fix: redirect users to/login if their oauth token is invalid#19429

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
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
fix: revert backend changes
  • Loading branch information
@brettkolodny
brettkolodny committedAug 19, 2025
commitce41dccaa9ec8f4df5281b0112f7934f7223191d
6 changes: 1 addition & 5 deletionscoderd/coderd.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1225,11 +1225,6 @@ func New(options *Options) *API {
r.Post("/first", api.postFirstUser)
r.Get("/authmethods", api.userAuthMethods)

r.Group(func(r chi.Router) {
r.Use(apiKeyMiddlewareOptional)
r.Post("/logout", api.postLogout)
})

r.Group(func(r chi.Router) {
// We use a tight limit for password login to protect against
// audit-log write DoS, pbkdf2 DoS, and simple brute-force
Expand DownExpand Up@@ -1263,6 +1258,7 @@ func New(options *Options) *API {
)
r.Post("/", api.postUser)
r.Get("/", api.users)
r.Post("/logout", api.postLogout)
// These routes query information about site wide roles.
r.Route("/roles", func(r chi.Router) {
r.Get("/", api.AssignableSiteRoles)
Expand Down
9 changes: 1 addition & 8 deletionscoderd/userauth.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -708,14 +708,7 @@ func (api *API) postLogout(rw http.ResponseWriter, r *http.Request) {
http.SetCookie(rw, cookie)

// Delete the session token from database.
apiKey, ok := httpmw.APIKeyOptional(r)
if !ok {
httpapi.Write(ctx, rw, http.StatusOK, codersdk.Response{
Message: "Not authenticated",
})
return
}

apiKey := httpmw.APIKey(r)
aReq.Old = apiKey

logger := api.Logger.Named(userAuthLoggerName)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp