mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 21:05:19 +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 |
||
|---|---|---|
| .. | ||
| images | ||
| mcp | ||
| telemetry | ||
| access_control.py | ||
| audit.py | ||
| auth.py | ||
| channels.py | ||
| chat.py | ||
| code_interpreter.py | ||
| embeddings.py | ||
| files.py | ||
| filter.py | ||
| groups.py | ||
| headers.py | ||
| logger.py | ||
| middleware.py | ||
| misc.py | ||
| models.py | ||
| oauth.py | ||
| payload.py | ||
| pdf_generator.py | ||
| plugin.py | ||
| rate_limit.py | ||
| redis.py | ||
| response.py | ||
| security_headers.py | ||
| task.py | ||
| tools.py | ||
| webhook.py | ||