mirror of
https://github.com/NikkeTryHard/zerogravity.git
synced 2026-04-25 15:15:59 +03:00
[GH-ISSUE #49] 没有自动刷新 token #42
Labels
No labels
bug
enhancement
enhancement
notice
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/zerogravity#42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @benny-eu on GitHub (Feb 21, 2026).
Original GitHub issue: https://github.com/NikkeTryHard/zerogravity/issues/49
What happened?
token一小时后没有自动刷新,导致请求错误
How to reproduce
No response
Diagnostic Report
Additional Context
diagnostic.toon.zip
@NikkeTryHard commented on GitHub (Feb 22, 2026):
Fixed in v1.3.0 (commit 33a961c) — the proxy now periodically refreshes OAuth tokens and the MITM layer swaps the auth header on outgoing requests automatically.
If you update to the latest version this should be resolved. Thanks for the detailed logs — they helped confirm the fix was targeting the right issue. 🙏
@NikkeTryHard commented on GitHub (Feb 22, 2026):
Looking at your diagnostic report more carefully — I see
token_env_set: truewhich means you're usingZEROGRAVITY_TOKEN(a raw access token). Raw access tokens expire after ~1 hour and cannot be refreshed — there's no refresh token to renew them with.The auto-refresh fix only works with account-based auth (refresh tokens). To switch:
With accounts.json, the proxy will automatically refresh tokens before they expire. No more 401s after 1 hour. 👍
@benny-eu commented on GitHub (Feb 22, 2026):
我检查了 docker compose,并没有注入ZEROGRAVITY_TOKEN,为什么token_env_set 会是 true 呢?