Skip to content

Commit 5ea144b

Browse files
committed
[fix] Add data to token
1 parent 815e44a commit 5ea144b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

api/src/api/main.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ async def login(
4545
)
4646
# Create an access token
4747
access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES)
48-
access_token = create_access_token(data={}, expires_delta=access_token_expires)
48+
access_token = create_access_token(
49+
data={"sub": get_env_variable("ADMIN_USER")}, expires_delta=access_token_expires
50+
)
4951
return {"access_token": access_token, "token_type": "bearer"}
5052

5153

0 commit comments

Comments
 (0)