Repository navigation
Conversation
|
Thanks for the PR, but i don’t quite get the scenario here, when would someone want the account to drop to re-login instead of renewing from the saved credentials? If a user imported the account with cookies and the auto renewal quietly swapped it into a Chrome import, that could be a problem, but i still don’t quite understand it. |
|
Thanks — the cookie-import → Chrome-import case you mention is the concrete example I should have explained. My PR description was too vague. In the recovery code at this PR's head, the path is:
That is a change of credential source, not a switch to a different Google account: the code checks the email, and also checks the Gaia ID when prior OAuth material exists. This is confirmed by reading the code; I am not reporting a newly reproduced end-to-end incident. My use case is running independent local instances on two machines and explicitly managing how each account is authenticated. After a session is confirmed expired, I want the affected account to require my sign-in/re-import, rather than having a generation request automatically recover it from credentials available in that machine's Chrome profiles. I accept the interruption in exchange for that explicit decision. The proposed flag defaults to You are right that the current flag is broader than the cookie-to-Chrome case: it also disables reactive renewal from already saved material. A narrower policy controlling automatic Chrome-source fallback could address this specific use case while retaining same-source renewal. |
改动 / Changes
AUTH_RECOVERY,默认true,控制账户会话失效后的自动续签。开启时使用已保存的续签材料恢复认证并重放请求;关闭时将账户标记为需要重新登录,由用户在账户页完成登录。用于需要人工确认登录会话来源的部署。.env或环境变量中的取值,保存值与运行中配置不同时显示重启提示。验证 / Verification
go test -mod=readonly -trimpath -vet=off ./cmd/... ./internal/...:覆盖自动续签开启与关闭、账户认证状态、双向重启提示、设置保存和内部保存值的 JSON 可见性。260a729f的检查结果:Checks。