mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 06:02:06 -05:00
[PR #2574] [MERGED] feat: experimental SSO support for Google, Microsoft, and OIDC #7830
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/2574
Author: @cheahjs
Created: 5/26/2024
Status: ✅ Merged
Merged: 6/25/2024
Merged by: @tjbck
Base:
dev← Head:feat/oauth📝 Commits (10+)
a842d8ddeps: add authlib0210a10feat: experimental SSO support for Google, Microsoft, and OIDCb3557d0fix: bad authlib version7385016fix: only get user by emails without oauth sub776bb28fix: bad user get4a4e323refac: rename OPENID -> OAUTH06dbf59feat: make oauth config persist into config.json985fdcarefac: move things around, uplift oauth endpoints6a36039Merge remote-tracking branch 'upstream/dev' into feat/oautha1f4706fix: OAUTH_MERGE_ACCOUNTS_BY_EMAIL not being correctly read📊 Changes
52 files changed (+633 additions, -13 deletions)
View changed files
➕
backend/apps/webui/internal/migrations/017_add_user_oauth_sub.py(+49 -0)📝
backend/apps/webui/main.py(+2 -0)📝
backend/apps/webui/models/auths.py(+4 -1)📝
backend/apps/webui/models/users.py(+25 -0)📝
backend/apps/webui/routers/auths.py(+0 -1)📝
backend/config.py(+139 -0)📝
backend/main.py(+174 -2)📝
backend/requirements.txt(+1 -0)📝
pyproject.toml(+1 -0)📝
requirements-dev.lock(+9 -3)📝
requirements.lock(+9 -3)📝
src/lib/i18n/locales/ar-BH/translation.json(+2 -0)📝
src/lib/i18n/locales/bg-BG/translation.json(+2 -0)📝
src/lib/i18n/locales/bn-BD/translation.json(+2 -0)📝
src/lib/i18n/locales/ca-ES/translation.json(+2 -0)📝
src/lib/i18n/locales/ceb-PH/translation.json(+2 -0)📝
src/lib/i18n/locales/de-DE/translation.json(+2 -0)📝
src/lib/i18n/locales/dg-DG/translation.json(+2 -0)📝
src/lib/i18n/locales/en-GB/translation.json(+2 -0)📝
src/lib/i18n/locales/en-US/translation.json(+2 -0)...and 32 more files
📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Addresses #483
Adds support for SSO logins with Google, Microsoft, or an OIDC provider.
Env vars:
ENABLE_OAUTH_SIGNUP- allow accounts to be created when logging in with oauthOAUTH_MERGE_ACCOUNTS_BY_EMAIL- allow logging in to the account keyed by the email address present in the id token. This is less secure because handling the provided email address requires a lot of care that I have not put in.<backend>/oauth/google/callback9188040d-6c67-4c5b-b112-36a304b66dadfor personal accounts<backend>/oauth/microsoft/callback<backend>/oauth/oidc/callbackAs email addresses are not generally trusted - authentication is matched against the
subfield of the ID token unlessOAUTH_MERGE_ACCOUNTS_BY_EMAILis enabled.Added
Screenshots or Videos
Example deployment: https://jscheah-open-webui.hf.space/
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.