Repository navigation
Description
Summary
Since ~2026-11-12, gog auth add for a Google Workspace account hangs on the Google consent screen: after clicking Allow the page spins forever (sometimes shows 400. That's an error. The server cannot process the request because it is malformed.). The loopback callback never receives a request.
Removing include_granted_scopes=true from the generated auth URL (everything else unchanged, PKCE included) makes consent succeed immediately. There is currently no flag to disable that parameter for normal (full-scope) auth.
Environment
- gog v0.48.0 (also reproduced on v0.11.0 before upgrading)
- macOS (Darwin 24.6), Chrome 157 and Safari
- Google Workspace account, OAuth client type Desktop, consent screen user type Internal
- Same account + same GCP project + same client worked with
gog auth addon 2026-11-11
What the browser receives
Captured with Chrome NetLog. The consent submit RPC returns HTTP 200 with an INTERNAL error payload (sensitive values omitted):
POST https://accounts.google.com/_/OAuthUi/data/batchexecute?rpcids=qu7pO&source-path=%2Fsignin%2Foauth%2Fv3%2Fconsent&...&bl=boq_identity-oauth-http_20261110.03_p0
-> HTTP 200
)]}'
[["wrb.fr","qu7pO",null,null,null,[13],"generic"],["di",81],["af.httprm",80,"<omitted>",40]]
[["e",4,null,null,141]]
Console shows Uncaught (in promise) RpcError. Note the consent UI build label boq_identity-oauth-http_20261110.03, which lines up with when this started.
What we ruled out
All of these still failed with [13] while include_granted_scopes=true was present:
- different browsers / incognito / fresh Chrome profile
- different networks (incl. VPN)
- Workspace "Google Cloud session control" set to never require reauth; app marked Trusted in Admin console
- a brand-new OAuth Desktop client in the same project
- scopes narrowed to calendar only (
--services calendar) - gog v0.11.0 → v0.48.0 (with S256 PKCE)
Control: gws auth login with the same client and project succeeds. Its URL does not send include_granted_scopes. Google's own gcloud auth login --force also succeeds for the same account.
Workaround
gog auth add <email> --client <name> --services gmail,calendar,drive,sheets --force-consent --remote --step 1
# delete "&include_granted_scopes=true" from the printed URL, open it, click Allow
gog auth add <email> --client <name> --services gmail,calendar,drive,sheets --force-consent --remote --step 2 --auth-url '<callback url>'Two small papercuts seen along the way:
- If
auth liststill has the account but the keyring token is gone, step 2 fails withSecret not found in keyring (refresh token missing)untilgog auth remove <email>is run. - Step 2 returns
manual auth state mismatchunless its flags match step 1 exactly (e.g.--force-consent).
Request
An opt-out such as gog auth add --no-include-granted-scopes (or an env/config switch) so users can avoid this without hand-editing the URL. internal/googleauth/oauth_flow.go already supports DisableIncludeGrantedScopes; it is only enabled for readonly/narrowed modes today.
This looks like a Google-side regression in merging prior grants, so the root cause may not be in gog, but the flag would make it recoverable.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
ericlu-sys commentedon Nov 13, 2026
A/B confirmation, same account / client / gog v0.48.0, ~20 minutes apart:
--remote --step 1with&include_granted_scopes=trueremoved → Allow succeeds, step 2 stores the token.include_granted_scopes=true, PKCE S256 present) → spinner again; NetLog shows the same response:So it is not a transient Google outage that happened to clear; the parameter alone flips the result for this account.
clawsweeper commentedon Nov 13, 2026
Codex review: this still needs some work.
Summary
Keep open: the reporter provides a controlled consent failure on v0.48.0, current main retains the triggering parameter, and the merged follow-up explicitly excludes this issue.
Reproducibility: The reporter supplies a controlled affected-account A/B reproduction on v0.48.0; current source confirms the parameter-generation path, but this review did not reproduce Google's consent failure.
Maintainer decision needed
Next step
Choose the full-scope opt-out contract, then establish URL and remote-state regressions and confirm consent succeeds on the affected account.
Security
None.
Review details
Best possible solution:
Provide a supported full-scope authorization path that omits incremental grants while preserving PKCE, state validation, and existing grant metadata.
Do we have a high-confidence way to reproduce the issue?
The reporter supplies a controlled affected-account A/B reproduction on v0.48.0; current source confirms the parameter-generation path, but this review did not reproduce Google's consent failure.
Is this the best way to solve the issue?
An explicit opt-out is the narrower compatibility change; Google's desktop OAuth guide confirms incremental authorization is unsupported for installed apps, but does not establish the reported backend failure's cause.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against 6d97417eade9.
Label changes
Label changes:
No label changes.
Label justifications:
P2: A concrete account-specific authorization failure has a verified reporter workaround, with no evidence of broad service disruption.impact:auth-provider: Google consent never returns the callback needed to obtain a refresh token.impact:ux-friction: Recovery requires manually editing the authorization URL and completing matching remote steps.Evidence reviewed
Acceptance criteria:
What I checked:
internal/cmd/auth_add.go:98, 6d97417eade9)internal/googleauth/oauth_flow.go:304, 6d97417eade9)internal/googleauth/oauth_flow_more_test.go:59, 6d97417eade9)internal/googleauth/oauth_flow.go, 25040fe7fe23)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.Reviewed November 14, 2026, 12:33 PM ET / 17:33 UTC.
ericlu-sys commentedon Nov 13, 2026
Likely root cause from Google's own docs: the installed/desktop-app guide (https://developers.google.com/identity/protocols/oauth2/native-app) states "Incremental authorization is not supported for installed apps or devices", and
include_granted_scopesis not in that page's parameter list. gog sends it by default for Desktop (installed) clients viaauthURLParamsininternal/googleauth/oauth_flow.go.Google appears to have tolerated it until around 2026-11-12; with the current consent backend it now fails as
qu7pO→[13] "generic"instead of a clearinvalid_request. Suggest not sendinginclude_granted_scopesfor installed-app clients (or at least exposing an opt-out).gwsandgcloud auth loginomit it and work for the same account/client.