Update token cookie max age

This commit is contained in:
Ivan R. 2023-07-22 21:02:54 +05:00
parent 292df39bb8
commit e24a3a754c
No known key found for this signature in database
GPG key ID: 56C7BAAE859B302C

View file

@ -132,7 +132,7 @@ func AuthorizeUser(c *gin.Context, db *gorm.DB, cfg *config.Config) {
c.Redirect(http.StatusFound, "/")
}
// Save token for 29 days in cookies
// Save token for one day in cookies
func SetTokenCookie(c *gin.Context, token string) {
c.SetCookie("phoenix-token", token, 60*60*24*29, "/", "", false, true)
c.SetCookie("phoenix-token", token, 60*60*24, "/", "", false, true)
}