Melvynx/saveit.now / .agents/skills/ns-setup-google-auth
ns-setup-google-auth
VerifiedSet up and verify Google OAuth for NowStack Mobile web and Expo clients against the shared Better Auth and Convex backend. Use for Google sign-in buttons, Google Cloud OAuth clients, callback URLs, missing GOOGLE_CLIENT_ID or GOOGLE_CLIENT_SECRET, or production Google auth rotation.
Setup Google Auth - NowStack Mobile
<read_first> Read the auth feature flag and the real provider implementation before changing anything:
rg -n "enableGoogleSignIn|GOOGLE_CLIENT|google|getEnabledAuthProviders|CONVEX_SITE" \
site-config.ts convex mobile-app web-app scripts
npx convex env list | sed 's/=.*$/=<set>/'
npx convex run auth:getEnabledAuthProviders '{}'
For --prod, also run:
npx convex env list --prod | sed 's/=.*$/=<set>/'
npx convex run --prod auth:getEnabledAuthProviders '{}'
Derive {convex_site_host} from the target deployment's .convex.site URL. The callback is always:
https://{convex_site_host}/api/auth/callback/google
</read_first>
# development
npx convex env set SITE_URL "http://localhost:3111"
npx convex env set GOOGLE_CLIENT_ID "<client>.apps.googleusercontent.com"
pbpaste | npx convex env set GOOGLE_CLIENT_SECRET
# production (--prod)
npx convex env set --prod SITE_URL "https://<production-app-domain>"
npx convex env set --prod GOOGLE_CLIENT_ID "<production-client>.apps.googleusercontent.com"
pbpaste | npx convex env set --prod GOOGLE_CLIENT_SECRET
On non-macOS systems, use the platform clipboard equivalent or pipe a protected runtime variable to the same value-less convex env set command. Never put the secret literal in the command line.
- Do not write these values to
.env,.env.local,site-config.ts, docs, shell history, or build config.
# development
npx convex run auth:getEnabledAuthProviders '{}'
# production
npx convex run --prod auth:getEnabledAuthProviders '{}'
The result must report google: true. Then:
- Open the signed-out web sign-in route with the repo's browser-verification workflow.
- Confirm the Google button is visible.
- Click it and confirm the redirect reaches
accounts.google.com, uses the expected client ID, and carries the exact target Convex callback. - On mobile, reload the Expo app against the same target Convex deployment and confirm the Google button appears. Exercise the redirect/deep-link return when the environment supports it.
If the button is absent, check the feature flag, target deployment, both Convex env values, and query result before changing UI code.
<production_invariant>
A production deployment is blocked until a production-specific Google OAuth client exists, its production callback is registered, its fresh client secret is stored with --prod, and the production provider query returns google: true. Development credentials are not a production shortcut.
</production_invariant>
<success_criteria>
- Correct deployment-specific callback registered in Google Cloud.
- Client ID and secret exist only in the matching Convex environment.
- Provider query reports Google enabled on the target deployment.
- Web redirect and mobile provider visibility are verified.
- Production never reuses the development OAuth client secret. </success_criteria>
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |