mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-10 08:47:14 +00:00
feat: emit the auth.login event on SSO logins
This commit is contained in:
parent
483adf7040
commit
c3eabb6417
1 changed files with 10 additions and 0 deletions
|
|
@ -2050,6 +2050,16 @@ class OAuthManager:
|
|||
**({'max_age': cookie_max_age} if cookie_max_age is not None else {}),
|
||||
)
|
||||
|
||||
await publish_event(
|
||||
request,
|
||||
EVENTS.AUTH_LOGIN,
|
||||
actor=user,
|
||||
subject_id=user.id,
|
||||
subject_type='user',
|
||||
source='oauth',
|
||||
data={'auth_method': 'oauth', 'provider': provider},
|
||||
)
|
||||
|
||||
# Legacy cookies for compatibility with older frontend versions
|
||||
if ENABLE_OAUTH_ID_TOKEN_COOKIE:
|
||||
response.set_cookie(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue