fix: jwt expiry not taken from configuration
This commit is contained in:
parent
f012766ec7
commit
7d3595fdcd
2 changed files with 4 additions and 5 deletions
|
|
@ -190,11 +190,11 @@ func (s *AuthService) VerifyJWT(tokenString string) (jwt.MapClaims, error) {
|
|||
return nil, fmt.Errorf("invalid token")
|
||||
}
|
||||
|
||||
func (s *AuthService) SetJWTCookie(w http.ResponseWriter, token string, expiry time.Time) {
|
||||
func (s *AuthService) SetJWTCookie(w http.ResponseWriter, token string) {
|
||||
http.SetCookie(w, &http.Cookie{
|
||||
Name: "auth_token",
|
||||
Value: token,
|
||||
Expires: expiry,
|
||||
Expires: time.Now().Add(s.jwtExpiry),
|
||||
Path: "/",
|
||||
HttpOnly: true,
|
||||
Secure: s.isProduction,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue