Skip to content

Commit

Permalink
added path to cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-hanna committed Jul 28, 2017
1 parent 4973b24 commit bdf75f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jwt/auth-utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func (a *Auth) setCredentialsOnResponseWriter(w http.ResponseWriter, c *credenti
authCookie := http.Cookie{
Name: a.options.AuthTokenName,
Value: authTokenString,
Path: "/",
// Expires: time.Now().Add(a.options.AuthTokenValidTime),
HttpOnly: true,
Secure: !a.options.IsDevEnv,
Expand All @@ -91,6 +92,7 @@ func (a *Auth) setCredentialsOnResponseWriter(w http.ResponseWriter, c *credenti
Name: a.options.RefreshTokenName,
Value: refreshTokenString,
Expires: time.Now().Add(a.options.RefreshTokenValidTime),
Path: "/",
HttpOnly: true,
Secure: !a.options.IsDevEnv,
}
Expand Down

0 comments on commit bdf75f3

Please sign in to comment.