aboutsummaryrefslogtreecommitdiff
path: root/api/auth
diff options
context:
space:
mode:
Diffstat (limited to 'api/auth')
-rw-r--r--api/auth/login.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/api/auth/login.py b/api/auth/login.py
index b01e057..5326b6f 100644
--- a/api/auth/login.py
+++ b/api/auth/login.py
@@ -28,4 +28,7 @@ def index():
new_token = token.generate_token()
token.add_token(user_id[0], token.hash_token(new_token))
- return new_token, 200
+ res = make_response("", 200)
+ res.set_cookie("token", new_token["token"], expires = int(new_token["expirationDate"] / 1000))
+
+ return res