mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #3202] [MERGED] feat: added ability to set user name for federated auth #36833
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/3202
Author: @JohnTheNerd
Created: 6/16/2024
Status: ✅ Merged
Merged: 6/17/2024
Merged by: @tjbck
Base:
dev← Head:main📝 Commits (1)
c00a6faadded ability to set user name for federated auth📊 Changes
3 files changed (+10 additions, -2 deletions)
View changed files
📝
backend/apps/webui/main.py(+2 -0)📝
backend/apps/webui/routers/auths.py(+5 -2)📝
backend/config.py(+3 -0)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
this PR adds an optional environment variable named
WEBUI_AUTH_TRUSTED_NAME_HEADER, which sets the user's name to the contents of that header. this only happens if the user is just being created, just like how the trusted e-mail header works.if the environment variable or header is not present, we fall back to the original behavior which is to re-use the user e-mail address.
Added
Changed
None
Deprecated
None
Removed
None
Fixed
N/A
Security
N/A
Breaking Changes
N/A, it will fall back to original behavior if the header or environment variable does not exist.
Additional Information
The GitHub actions are failing due to uppercase characters in my username, so to test, I first fixed that (#3204), merged both changes in a separate branch, and merely ran the actions. The images are available in the images containing
ci-cd-testin the Packages section of my fork. I deployed the resulting image to my homelab and it's working fine so far.Documentation changes are at https://github.com/open-webui/docs/pull/117 and the discussion post is #3201 .
Screenshots or Videos
N/A
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.