Implement login API, closes #1 #2

Open
BlackCorbeau wants to merge 25 commits from dev into main
Showing only changes of commit cdf195306e - Show all commits
+2 -1
View File
@@ -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