Skip to content

Fix Google consent: clientId pinning, tokenless-reconnect probe, read-only scope pin - #9

Merged
DIodide merged 1 commit into
mainfrom
fix/gcal-consent-trigger
Aug 22, 2026
Merged

Fix Google consent: clientId pinning, tokenless-reconnect probe, read-only scope pin#9
DIodide merged 1 commit into
mainfrom
fix/gcal-consent-trigger

Conversation

@DIodide

@DIodide DIodide commented Aug 22, 2026

Copy link
Copy Markdown
Member

Three fixes verified against the live Google endpoint with the real provider class: (1) pin the pre-registered clientId — the stock provider's getter throws when unset, killing the auth leg before a consent URL existed; (2) run the consent probe even when the desk connection already exists but has no tokens; (3) pin the authorize scope to the read-only trio instead of the SDK's resource-metadata-derived list, which included write scopes.

https://claude.ai/code/session_01MKLJUWk6biNAKXupHTTWn5

The stock DO OAuth provider only learns its clientId from dynamic
registration — which Google never does — and its clientId getter throws
when unset, killing the authorization leg inside saveCodeVerifier
before any consent URL existed. GoogleOAuthProvider now pins the
pre-registered clientId in its constructor.

Two more holes closed: the consent probe now also runs when the desk is
already connected but tokenless (a connection left over from an earlier
visit skipped the probe entirely), and the authorize URL's scope is
pinned to the read-only trio — the SDK was deriving scopes from
Google's resource metadata, which advertises write scopes.

Verified with the real provider class against the live endpoint: auth
URL produced with the three read-only scopes, access_type=offline,
prompt=consent, and persisted state + verifier records for the
callback.

Claude-Session: https://claude.ai/code/session_01MKLJUWk6biNAKXupHTTWn5
@DIodide
DIodide merged commit 43c6310 into main Aug 22, 2026
2 checks passed
@DIodide
DIodide deleted the fix/gcal-consent-trigger branch August 22, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant