feat(utils/token.py): Create JVT token
Added function with is creating jvt tocken for user
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
import jwt
|
||||||
|
import os
|
||||||
|
|
||||||
|
def generateKey(email, passwd):
|
||||||
|
key = os.getenv('KEY')
|
||||||
|
encoded = jwt.encode({f"{email}": f"{passwd}"}, key, algorithm="HS256")
|
||||||
|
return encoded
|
||||||
Reference in New Issue
Block a user