[GH-ISSUE #6575] Internal Server Error - Microsoft OAuth #134136

Closed
opened 2026-05-24 23:51:10 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @iunknown80 on GitHub (Oct 30, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/6575

Discussed in https://github.com/open-webui/open-webui/discussions/6464

Originally posted by gabrielsusai October 27, 2024
Hi,

I've deployed the Open WebUI application in a Docker container and hosted it on Azure App Service. The application is configured with Microsoft OAuth to allow employees SSO access to Open WebUI. We initially had a smooth login experience and were able to use the application successfully. However, after a few days, we began encountering the following issues:

  1. After clicking the SSO button, the screen displays a 'successful login' message, but the page remains blank. Inspecting with Chrome developer tools shows an error at the following endpoint: api/v1/users/user/settings. The error message is (410 Unauthorized): "Your session has expired or the token is invalid. Please sign in again." Despite the successful SSO message, this issue persists.
  2. Occasionally, we receive a 501 Internal Error. Logs indicate that "Authorization code was already redeemed"
    [open_webui.main] OAuth callback error: invalid_grant: AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token. Trace ID: b87e8b61-0fa7-4e11-b55e-eff34f518100 Correlation ID: 0ec3a0a4-5f03-4618-8985-0cb5e1bf038d Timestamp: 2024-10-25 20:12:59Z

Currently, we have one admin and five test users successfully registered who were actively using the application until these issues began to arise. This is now blocking our testing. Any assistance would be greatly appreciated.

Thanks

Originally created by @iunknown80 on GitHub (Oct 30, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/6575 ### Discussed in https://github.com/open-webui/open-webui/discussions/6464 <div type='discussions-op-text'> <sup>Originally posted by **gabrielsusai** October 27, 2024</sup> Hi, I've deployed the Open WebUI application in a Docker container and hosted it on Azure App Service. The application is configured with Microsoft OAuth to allow employees SSO access to Open WebUI. We initially had a smooth login experience and were able to use the application successfully. However, after a few days, we began encountering the following issues: 1. After clicking the SSO button, the screen displays a 'successful login' message, but the page remains blank. Inspecting with Chrome developer tools shows an error at the following endpoint: api/v1/users/user/settings. The error message is (410 Unauthorized): "Your session has expired or the token is invalid. Please sign in again." Despite the successful SSO message, this issue persists. 2. Occasionally, we receive a 501 Internal Error. Logs indicate that "Authorization code was already redeemed" [open_webui.main] OAuth callback error: invalid_grant: AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token. Trace ID: b87e8b61-0fa7-4e11-b55e-eff34f518100 Correlation ID: 0ec3a0a4-5f03-4618-8985-0cb5e1bf038d Timestamp: 2024-10-25 20:12:59Z Currently, we have one admin and five test users successfully registered who were actively using the application until these issues began to arise. This is now blocking our testing. Any assistance would be greatly appreciated. Thanks</div>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#134136