Skip to content

Commit

Permalink
fix: strip user_id
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Feb 21, 2024
1 parent 21444ff commit 66a9c04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 66a9c04

Please sign in to comment.