fix: token expiration sets to 12 hours
parent
d4d05a498a
commit
ee65139bfc
|
|
@ -48,8 +48,8 @@ func Login(c *fiber.Ctx) error {
|
|||
}
|
||||
|
||||
claims := &jwt.RegisteredClaims{
|
||||
ExpiresAt: &jwt.NumericDate{Time: time.Now().Add(30 * time.Second)}, // Token expiration time
|
||||
Issuer: strconv.Itoa(int(user.ID)), // Subject of the token
|
||||
ExpiresAt: &jwt.NumericDate{Time: time.Now().Add(12 * time.Hour)}, // Token expiration time
|
||||
Issuer: strconv.Itoa(int(user.ID)), // User that creates the token
|
||||
}
|
||||
|
||||
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
|
||||
|
|
|
|||
Loading…
Reference in New Issue