feat: sesión 1 año + validación sintaxis plantilla en tiempo real
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ func (t *Token) CreateToken(c *fiber.Ctx, userID uint, secret string, expire ...
|
||||
if len(expire) > 0 {
|
||||
t.Expire = expire[0]
|
||||
} else {
|
||||
t.Expire = 3600
|
||||
t.Expire = 31536000 // 1 año por defecto si no se configura
|
||||
}
|
||||
expiresIn := time.Now().Add(time.Duration(t.Expire) * time.Second).Unix()
|
||||
claims["exp"] = expiresIn
|
||||
|
||||
Reference in New Issue
Block a user