[PR #12376] [MERGED] feat: Add option to disable OAuth profile pictures #22905

Closed
opened 2026-04-20 04:28:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/12376
Author: @MushroomLamp-COB
Created: 4/3/2025
Status: Merged
Merged: 4/3/2025
Merged by: @tjbck

Base: devHead: main


📝 Commits (1)

  • 548c7f1 Added OAUTH_USE_PICTURE_CLAIM env var

📊 Changes

2 files changed (+47 additions, -34 deletions)

View changed files

📝 backend/open_webui/config.py (+6 -0)
📝 backend/open_webui/utils/oauth.py (+41 -34)

📄 Description

Pull Request Description

This PR adds a new configuration option OAUTH_USE_PICTURE_CLAIM that allows administrators to toggle whether OAuth profile pictures are used or if the default user.png avatar is used instead. This addresses issue #12325, providing a simple way to disable the use of profile pictures from OAuth providers.

Changelog Entry

Description
Added a new environment variable and configuration option to control whether profile pictures from OAuth providers are used or if the default avatar is used instead. This provides administrators with greater control over user avatars in their Open WebUI deployment.
Added

Added OAUTH_USE_PICTURE_CLAIM environment variable and corresponding PersistentConfig entry
Added conditional logic in oauth.py to respect this setting when processing user profile pictures

Changed

Modified the OAuth authentication flow to check the new configuration option before attempting to fetch and process profile pictures

Fixed

Fixes #12325: Added option to turn off the use of profile pictures from OAuth claims

Additional Information

This change is minimal and focused on providing administrators with greater control over avatar usage. The default setting is True, which maintains backward compatibility with existing behavior.

Tested on a docker, expected functionality for True, False, and not specified values.
(this is my first time doing a PR, hopefully this is ok)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/12376 **Author:** [@MushroomLamp-COB](https://github.com/MushroomLamp-COB) **Created:** 4/3/2025 **Status:** ✅ Merged **Merged:** 4/3/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `main` --- ### 📝 Commits (1) - [`548c7f1`](https://github.com/open-webui/open-webui/commit/548c7f17d7ec26144f22402f50348b4eb07b4bad) Added OAUTH_USE_PICTURE_CLAIM env var ### 📊 Changes **2 files changed** (+47 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+6 -0) 📝 `backend/open_webui/utils/oauth.py` (+41 -34) </details> ### 📄 Description ### Pull Request Description This PR adds a new configuration option OAUTH_USE_PICTURE_CLAIM that allows administrators to toggle whether OAuth profile pictures are used or if the default user.png avatar is used instead. This addresses issue #12325, providing a simple way to disable the use of profile pictures from OAuth providers. ### Changelog Entry **Description** Added a new environment variable and configuration option to control whether profile pictures from OAuth providers are used or if the default avatar is used instead. This provides administrators with greater control over user avatars in their Open WebUI deployment. Added Added OAUTH_USE_PICTURE_CLAIM environment variable and corresponding PersistentConfig entry Added conditional logic in oauth.py to respect this setting when processing user profile pictures **Changed** Modified the OAuth authentication flow to check the new configuration option before attempting to fetch and process profile pictures **Fixed** Fixes #12325: Added option to turn off the use of profile pictures from OAuth claims ### Additional Information This change is minimal and focused on providing administrators with greater control over avatar usage. The default setting is True, which maintains backward compatibility with existing behavior. Tested on a docker, expected functionality for True, False, and not specified values. (this is my first time doing a PR, hopefully this is ok) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 04:28:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#22905