mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-10 03:27:57 +00:00
auths: match JWT expiry on /auths/add with other sign-in paths (#23576)
This commit is contained in:
parent
6acaaea59a
commit
faf935ef52
1 changed files with 2 additions and 1 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue