Skip to content

Commit

Permalink
[fix] Add data to token
Browse files Browse the repository at this point in the history
  • Loading branch information
georgejkaye committed Mar 17, 2024
1 parent 815e44a commit 5ea144b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/src/api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ async def login(
)
# Create an access token
access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES)
access_token = create_access_token(data={}, expires_delta=access_token_expires)
access_token = create_access_token(
data={"sub": get_env_variable("ADMIN_USER")}, expires_delta=access_token_expires
)
return {"access_token": access_token, "token_type": "bearer"}


Expand Down

0 comments on commit 5ea144b

Please sign in to comment.