Skip to content

Commit

Permalink
Fix expiry formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
DTCurrie committed Dec 4, 2023
1 parent 36b74fd commit 1a9d1e8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions web/auth0.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,15 @@ func (h *callbackHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}

http.SetCookie(w, &http.Cookie{
Name: h.redirectStateCookieName,
Value: "",
Path: "/",
MaxAge: -1,
Secure: r.TLS != nil,
SameSite: http.SameSiteLaxMode,
HttpOnly: true,
})
// http.SetCookie(w, &http.Cookie{
// Name: h.redirectStateCookieName,
// Value: "",
// Path: "/",
// MaxAge: -1,
// Secure: r.TLS != nil,
// SameSite: http.SameSiteLaxMode,
// HttpOnly: true,
// })

stateParts := strings.SplitN(stateCookie.Value, ":", 2)
if len(stateParts) != 2 {
Expand Down Expand Up @@ -304,7 +304,7 @@ func (h *callbackHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {

http.SetCookie(w, &http.Cookie{
Name: "viam.auth.expiry",
Value: token.Expiry.String(),
Value: token.Expiry.Format(time.RFC3339),
Path: "/",
Expires: token.Expiry,
Secure: r.TLS != nil,
Expand Down

0 comments on commit 1a9d1e8

Please sign in to comment.