You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Google OAuth Web client for the AdSense sign-in popup #78
Owner: James (@Lin1er) · Branch: none (console setup; the id goes to the front end's env) · Milestone: M3 · Blocks:#75 running for real, #20, #22
Why
The relay (#17) proves revenue from a Google access token with adsense.readonly. The front end gets that token through Google Identity Services' popup (#75), and the popup needs an OAuth client id. There isn't one yet.
What to set up
A Google Cloud project with the AdSense Management API enabled.
The client id goes to the front end as NEXT_PUBLIC_GOOGLE_CLIENT_ID. It is public by design. The client secret is not used anywhere and must not be shared.
Done when
In a browser on the front end, the popup returns a token carrying adsense.readonly, and POST /proofs on https://api-forepay.jameshub.fun accepts it. That proves the token is valid, even if the account itself isn't READY yet.
Working agreement
One issue, one owner. 2. Branch per issue, named above — not the GitHub-suggested one. 3. MCP Stellar Raven for any Stellar/Soroban fact that gets written down. 4. Merge through PR review by Axel (PM); no self-merge. If an ACC has not arrived within two days on something already verified, merge and say so in the PR. 5. Deploys need evidence: contract address or tx hash on stellar.expert, recorded in docs/deployments.md. 6. Secrets live in .env, gitignored, chmod 600 — never printed, never committed, never pasted into an issue or PR. Only public G… and C… addresses appear anywhere. 7. Issues, commits and PRs in English.
Origin:http://localhost:3000 only, for now. When the front end has a deployed URL, send it to me. It goes into the client's JavaScript origins and into the relay's CORS_ORIGINS, and both have to match or the popup and POST /proofs fail.
Checked: Google knows the client (an unknown id answers invalid_client; this one does not). The popup itself from localhost has not been clicked through yet. I'll keep this issue open until it has.
Popup. Clicked through on http://localhost:3000/advance, on #17 Front end relay client behind proveRevenue #75's branch with production build next start. Google's popup opened, the test user signed in and granted adsense.readonly.
Relay. The relay received the token. Its log has a proof job from that browser session at 2026-10-20 23:58 UTC, separate from my curl tests. It passed validation and went on to Google. It failed in 4 s, as expected: the account has never earned anything (Find an approved (READY) AdSense account for the gate and the demo #77), so there is no figure to prove.
That is the "Done when": a popup token carrying the scope, accepted by POST /proofs on the live relay.
Still open, outside this issue: the deployed front end's origin. When it exists, it goes into the client's JavaScript origins and the relay's CORS_ORIGINS.
Activity
Lin1er commentedon Oct 20, 2026
@Nabil-Aufa the OAuth Web client exists. The id is public, it ends up in the browser bundle anyway:
http://localhost:3000only, for now. When the front end has a deployed URL, send it to me. It goes into the client's JavaScript origins and into the relay'sCORS_ORIGINS, and both have to match or the popup andPOST /proofsfail.adsense.readonlyonly. The consent screen is in Testing, so only Google accounts listed as test users can sign in. Whoever signs in for Find an approved (READY) AdSense account for the gate and the demo #77 has to be added first: send me the email privately, not here.invalid_client; this one does not). The popup itself from localhost has not been clicked through yet. I'll keep this issue open until it has.Lin1er commentedon Oct 21, 2026
Done, closing.
http://localhost:3000/advance, on #17 Front end relay client behind proveRevenue #75's branch with production buildnext start. Google's popup opened, the test user signed in and grantedadsense.readonly.That is the "Done when": a popup token carrying the scope, accepted by
POST /proofson the live relay.Still open, outside this issue: the deployed front end's origin. When it exists, it goes into the client's JavaScript origins and the relay's
CORS_ORIGINS.