mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-27 17:04:57 -05:00
auths: match JWT expiry on /auths/add with other sign-in paths (#23576)
This commit is contained in:
@@ -877,7 +877,8 @@ async def add_user(
|
||||
db=db,
|
||||
)
|
||||
|
||||
token = create_token(data={'id': user.id})
|
||||
expires_delta = parse_duration(request.app.state.config.JWT_EXPIRES_IN)
|
||||
token = create_token(data={'id': user.id}, expires_delta=expires_delta)
|
||||
return {
|
||||
'token': token,
|
||||
'token_type': 'Bearer',
|
||||
|
||||
Reference in New Issue
Block a user