Skip to content

Google OAuth Web client for the AdSense sign-in popup #78

Closed

Description

@Lin1er

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.
  • An OAuth client of type "Web application":
  • The OAuth consent screen:
  • 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

  1. 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.

Activity

  1. added
    M3-appWeek 3 — proof relay and the creator front end
    deliverable-2SOW Deliverable 2 — Reclaim provider and application
    on Oct 20, 2026
  2. self-assigned this
    on Oct 20, 2026
  3. Lin1er commented on Oct 20, 2026

    @Lin1er
    CollaboratorAuthor

    @Nabil-Aufa the OAuth Web client exists. The id is public, it ends up in the browser bundle anyway:

    NEXT_PUBLIC_GOOGLE_CLIENT_ID=1010067358861-bk2gcu8ohnkmjmf182fgb2ijrhmpnluk.apps.googleusercontent.com
    NEXT_PUBLIC_RELAY_URL=https://api-forepay.jameshub.fun
    
    • 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.
    • Scope: adsense.readonly only. 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.
    • 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.
  4. Lin1er commented on Oct 21, 2026

    @Lin1er
    CollaboratorAuthor

    Done, closing.

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

M3-appWeek 3 — proof relay and the creator front enddeliverable-2SOW Deliverable 2 — Reclaim provider and application

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions