reduce game token lifetime
This commit is contained in:
@@ -4,7 +4,7 @@ class JwtService
|
||||
EXPIRATION = 7.days
|
||||
|
||||
def self.encode(payload)
|
||||
payload[:exp] = EXPIRATION.from_now.to_i
|
||||
payload[:exp] = EXPIRATION.from_now.to_i if payload[:exp] == nil
|
||||
JWT.encode(payload, SECRET_KEY, ALGORITHM)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user