mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-14 05:15:18 +00:00
Add a background task that periodically refreshes OAuth tokens before they expire, preventing users from having to re-authenticate when MCP OAuth tokens (like Notion) expire after 1 hour. Changes: - Add get_expiring_sessions() method to OAuthSessionTable to query sessions expiring within a specified time window - Enhance OAuthClientManager._perform_token_refresh() to handle unregistered MCP clients by discovering OAuth info from stored tool server config - Add periodic_oauth_token_refresh() background task that runs every 5 minutes and refreshes tokens expiring within 10 minutes - Start the background task in app lifespan with proper cleanup Fixes #19809 |
||
|---|---|---|
| .. | ||
| auths.py | ||
| channels.py | ||
| chats.py | ||
| feedbacks.py | ||
| files.py | ||
| folders.py | ||
| functions.py | ||
| groups.py | ||
| knowledge.py | ||
| memories.py | ||
| messages.py | ||
| models.py | ||
| notes.py | ||
| oauth_sessions.py | ||
| prompts.py | ||
| tags.py | ||
| tools.py | ||
| users.py | ||