Skip to content

Commit

Permalink
APP-3746: Redirect to login when no auth cookie present (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaellee1019 authored May 6, 2024
1 parent 2af3f6c commit aedd104
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/auth0.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ func (h *callbackHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
defer span.End()

stateCookie, err := r.Cookie(h.redirectStateCookieName)
if HandleError(w, err, h.logger, "getting redirect cookie") {
if err != nil {
http.Redirect(w, r, "/login", http.StatusTemporaryRedirect)
return
}

Expand Down

0 comments on commit aedd104

Please sign in to comment.