Implement login API, closes #1 #2

Open
BlackCorbeau wants to merge 25 commits from dev into main
Showing only changes of commit f93b94531c - Show all commits
+1 -1
View File
@@ -3,5 +3,5 @@ import os
def generateKey(email, passwd):
key = os.getenv('KEY')
encoded = jwt.encode({f"{email}": f"{passwd}"}, key, algorithm="HS256")
encoded = jwt.encode({email: passwd}, key, algorithm="HS256")
Outdated
Review

1. encoded = jwt.encode({email: passwd}, key, algorithm="HS256")
2. Добавь iat, на всякий случай

~~1. `encoded = jwt.encode({email: passwd}, key, algorithm="HS256")`~~ 2. Добавь [`iat`](https://pyjwt.readthedocs.io/en/latest/usage.html#issued-at-claim-iat), на всякий случай
return encoded