mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-25 05:54:29 +00:00
Addresses review feedback on #26802: even after stamping a long-lived expiry, _perform_token_refresh still returned None for tokens without a refresh_token, so get_oauth_token would delete the session once that expiry elapsed — reproducing the original bug a year later instead of hourly. Flag tokens that carry neither expiry metadata nor a refresh_token with NON_REFRESHABLE_TOKEN_MARKER in _normalize_token_expiry. When such a token reaches the refresh path, _renew_non_refreshable_token re-stamps its local expiry in place and returns it, so the session keeps renewing itself (Slack xoxp user tokens never expire and never rotate). Tokens with a real provider-declared expiry but no refresh token are not flagged and remain untouched: they still expire and require re-auth. Also fixes the Ruff format failure on the branch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKLX4jqe4E868Zr43ZmzVC |
||
|---|---|---|
| .. | ||
| access_control | ||
| images | ||
| mcp | ||
| telemetry | ||
| actions.py | ||
| anthropic.py | ||
| asgi_middleware.py | ||
| audit.py | ||
| auth.py | ||
| automations.py | ||
| calendar.py | ||
| channels.py | ||
| chat.py | ||
| code_interpreter.py | ||
| context_compaction.py | ||
| embeddings.py | ||
| files.py | ||
| filter.py | ||
| groups.py | ||
| headers.py | ||
| logger.py | ||
| memory.py | ||
| middleware.py | ||
| misc.py | ||
| models.py | ||
| oauth.py | ||
| payload.py | ||
| pdf_generator.py | ||
| plugin.py | ||
| rate_limit.py | ||
| redis.py | ||
| response.py | ||
| sanitize.py | ||
| security_headers.py | ||
| session_pool.py | ||
| task.py | ||
| tools.py | ||
| validate.py | ||
| valves.py | ||
| webhook.py | ||