Skip to content

Commit

Permalink
fix auth redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
yusing committed Jan 13, 2025
1 parent 7cd44b5 commit 2af2346
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/api/v1/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ func AuthRedirectHandler(w http.ResponseWriter, r *http.Request) {
case oauthConfig != nil:
RedirectOIDC(w, r)
return
case common.APIJWTSecret == nil:
case common.APIJWTSecret != nil:
http.Redirect(w, r, "/login", http.StatusTemporaryRedirect)
return
default:
U.WriteBody(w, []byte("skip"))
w.WriteHeader(http.StatusOK)
http.Redirect(w, r, "/", http.StatusTemporaryRedirect)
}
}

Expand Down

0 comments on commit 2af2346

Please sign in to comment.