feat(jwt): add iat field
This commit is contained in:
+2
-1
@@ -1,7 +1,8 @@
|
||||
import jwt
|
||||
import os
|
||||
from time import time
|
||||
|
||||
def generateKey(email, passwd):
|
||||
key = os.getenv('KEY')
|
||||
encoded = jwt.encode({email: passwd}, key, algorithm="HS256")
|
||||
encoded = jwt.encode({email: passwd, 'iat': time()}, key, algorithm="HS256")
|
||||
return encoded
|
||||
|
||||
Reference in New Issue
Block a user