mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-11 10:03:05 -05:00
[GH-ISSUE #17585] issue: oauth access token refresh - 'coroutine' object has no attribute 'get' error #18336
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?
Originally created by @gvo on GitHub (Sep 18, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17585
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
0.6.30
Ollama Version (if applicable)
No response
Operating System
Windows
Browser (if applicable)
Chrome
Confirmation
README.md.Expected Behavior
OAuth access token should refresh properly.
Actual Behavior
When the token is near expiry and should be refreshed, you get a chat bubble stating 'coroutine' object has no attribute 'get'.
Steps to Reproduce
Logs & Screenshots
N/A
Additional Information
Required Changes:
def get_oauth_token(toasync def get_oauth_token(refreshed_token = self._refresh_token(session)torefreshed_token = await self._refresh_token(session)awaitto allget_oauth_token()calls@tjbck commented on GitHub (Sep 19, 2025):
Addressed with e4c4ba097925569d36b8c54d8f62f11a52ed098a!
@gvo commented on GitHub (Sep 19, 2025):
@tjbck just following up - I see you've addressed the await issue.
Discovered an upstream issue with _perform_token_refresh after my testing.
oauth.py Line 257: async with session_http.get(client.gserver_metadata_url) as r:
The gserver_metadata_url is a typo. However, assuming it's meant to be server_metadata_url, it's inaccessible:
Potential fix would be:
Also, for Microsoft providers the refresh_data is missing the "scope" parameter.
If scope is missing from the refresh token request the user will get this error: