mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
feat(gemini-web): Implement proactive PSIDTS cookie rotation
This commit is contained in:
@@ -861,7 +861,11 @@ func (m *Manager) refreshAuth(ctx context.Context, id string) {
|
||||
if updated == nil {
|
||||
updated = cloned
|
||||
}
|
||||
updated.Runtime = auth.Runtime
|
||||
// Preserve runtime created by the executor during Refresh.
|
||||
// If executor didn't set one, fall back to the previous runtime.
|
||||
if updated.Runtime == nil {
|
||||
updated.Runtime = auth.Runtime
|
||||
}
|
||||
updated.LastRefreshedAt = now
|
||||
updated.NextRefreshAfter = time.Time{}
|
||||
updated.LastError = nil
|
||||
|
||||
@@ -133,6 +133,7 @@ var defaultAuthenticatorFactories = map[string]func() clipauth.Authenticator{
|
||||
"qwen": func() clipauth.Authenticator { return clipauth.NewQwenAuthenticator() },
|
||||
"gemini": func() clipauth.Authenticator { return clipauth.NewGeminiAuthenticator() },
|
||||
"gemini-cli": func() clipauth.Authenticator { return clipauth.NewGeminiAuthenticator() },
|
||||
"gemini-web": func() clipauth.Authenticator { return clipauth.NewGeminiWebAuthenticator() },
|
||||
}
|
||||
|
||||
var expireKeys = [...]string{"expired", "expire", "expires_at", "expiresAt", "expiry", "expires"}
|
||||
|
||||
Reference in New Issue
Block a user