extended token length

This commit is contained in:
Fran Jurmanović
2021-06-18 22:54:06 +02:00
parent 820f5ef9bc
commit ec06120831

View File

@@ -111,7 +111,7 @@ func CreateToken(user *models.User) (string, error) {
atClaims := jwt.MapClaims{}
atClaims["authorized"] = true
atClaims["id"] = user.Id
atClaims["exp"] = time.Now().Add(time.Minute).Unix()
atClaims["exp"] = time.Now().Add(time.Hour * 2).Unix()
secret := os.Getenv("ACCESS_SECRET")
if secret == "" {