diff --git a/app/api.py b/app/api.py index db72c753..3de03afa 100644 --- a/app/api.py +++ b/app/api.py @@ -213,7 +213,7 @@ def authentication( # form_data.username can be the user_id or the email, so we need to # fetch the user_id from the response # We also need to lowercase the user_id as it's case-insensitive - user_id = r.json()["user_id"].lower() + user_id = r.json()["user_id"].lower().strip() token = create_token(user_id) session, *_ = crud.create_session(db, user_id=user_id, token=token) session = crud.update_session_last_used_field(db, session=session)