Skip to content

Commit faf935e

Browse files
authored
auths: match JWT expiry on /auths/add with other sign-in paths (open-webui#23576)
1 parent 6acaaea commit faf935e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

backend/open_webui/routers/auths.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,8 @@ async def add_user(
877877
db=db,
878878
)
879879

880-
token = create_token(data={'id': user.id})
880+
expires_delta = parse_duration(request.app.state.config.JWT_EXPIRES_IN)
881+
token = create_token(data={'id': user.id}, expires_delta=expires_delta)
881882
return {
882883
'token': token,
883884
'token_type': 'Bearer',

0 commit comments

Comments
 (0)