Shorter JWT token lifetime to enter chat
This commit is contained in:
parent
0527ff54b5
commit
7af6d82fc7
|
@ -82,9 +82,7 @@ func Landing() http.HandlerFunc {
|
|||
ProfileURL: "/u/" + currentUser.Username,
|
||||
Nickname: currentUser.NameOrUsername(),
|
||||
RegisteredClaims: jwt.RegisteredClaims{
|
||||
// TODO: ExpiresAt 60 minutes to work around chat server reliability,
|
||||
// should be shorter like 5 minutes.
|
||||
ExpiresAt: jwt.NewNumericDate(time.Now().Add(60 * time.Minute)),
|
||||
ExpiresAt: jwt.NewNumericDate(time.Now().Add(5 * time.Minute)),
|
||||
IssuedAt: jwt.NewNumericDate(time.Now()),
|
||||
NotBefore: jwt.NewNumericDate(time.Now()),
|
||||
Issuer: config.Title,
|
||||
|
|
Loading…
Reference in New Issue
Block a user