Skip to content

Commit

Permalink
Merge pull request #9 from micheltlutz/fix/get_current_user
Browse files Browse the repository at this point in the history
fix getenv get_current_user ALGORITHM
  • Loading branch information
micheltlutz authored Dec 29, 2023
2 parents 5d0424c + a804adc commit 0a74177
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/dependencies/current_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
def get_current_user(authorization: HTTPAuthorizationCredentials = Security(security)):
token = authorization.credentials
try:
payload = jwt.decode(token, os.getenv("SECRET"), algorithms=[os.getenv("algorithm")])
payload = jwt.decode(token, os.getenv("SECRET"), algorithms=[os.getenv("ALGORITHM")])
user_id = payload.get("sub")

if user_id is None:
Expand Down

0 comments on commit 0a74177

Please sign in to comment.