[PR #8397] [CLOSED] fix: Exception raised when new user tries to login through OAuth for the first time #9011

Closed
opened 2025-11-11 18:11:47 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/8397
Author: @kagesenshi
Created: 1/8/2025
Status: Closed

Base: devHead: upstream-dev


📝 Commits (3)

  • f0d1fad fix notification failure when registering new user in oauth
  • 9e62edb updated changelog in oauth bugfix
  • 6b39915 Revert "updated changelog in oauth bugfix"

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 backend/open_webui/utils/oauth.py (+3 -3)

📄 Description

Changelog Entry

Description

When logging in the first time through OAuth, following exception is raised:

  File "/app/backend/open_webui/utils/oauth.py", line 298, in <module>
    auth_manager_config.WEBHOOK_MESSAGES.USER_SIGNUP(user.name),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/config.py", line 258, in __setattr__
    self._state[key].value = value
    ~~~~~~~~~~~^^^^^
KeyError: 'WEBHOOK_MESSAGES'

This is caused by WEBHOOK_MESSAGES supposed to be coming from constants.py while this code tries to take it from auth_manager_config .

Fixed

  • Fixed exception raised when first login through OAuth

Additional Information

This has been reported by another user a month ago, but seems to not be addressed. I'm skipping creating a discussion post due to it.

https://github.com/open-webui/open-webui/discussions/7672


🔄 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/8397 **Author:** [@kagesenshi](https://github.com/kagesenshi) **Created:** 1/8/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `upstream-dev` --- ### 📝 Commits (3) - [`f0d1fad`](https://github.com/open-webui/open-webui/commit/f0d1fad0359450e9bfe1ac716e3fb76300b6833b) fix notification failure when registering new user in oauth - [`9e62edb`](https://github.com/open-webui/open-webui/commit/9e62edb67244931aa826285c3361e773c9595a8a) updated changelog in oauth bugfix - [`6b39915`](https://github.com/open-webui/open-webui/commit/6b39915b506dd95037c9bb8989d7d593d36a001d) Revert "updated changelog in oauth bugfix" ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/utils/oauth.py` (+3 -3) </details> ### 📄 Description # Changelog Entry ### Description When logging in the first time through OAuth, following exception is raised: ``` File "/app/backend/open_webui/utils/oauth.py", line 298, in <module> auth_manager_config.WEBHOOK_MESSAGES.USER_SIGNUP(user.name), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/config.py", line 258, in __setattr__ self._state[key].value = value ~~~~~~~~~~~^^^^^ KeyError: 'WEBHOOK_MESSAGES' ``` This is caused by `WEBHOOK_MESSAGES` supposed to be coming from `constants.py` while this code tries to take it from `auth_manager_config` . ### Fixed - Fixed exception raised when first login through OAuth ### Additional Information This has been reported by another user a month ago, but seems to not be addressed. I'm skipping creating a discussion post due to it. https://github.com/open-webui/open-webui/discussions/7672 --- <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 2025-11-11 18:11:47 -06: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#9011