Skip to content

Sign-in and accounts

Add Google sign-in without breaking existing accounts

Social login looks like one button and turns into consent screens, callback URLs and duplicate users.

What you get
The provider set up screen by screen, and a rule for people who already signed up with the same email.
Paste it into
Your AI tool, in your project
The prompt
I want to add "Continue with Google" to this app.

First read how sign-in works today and tell me what happens if someone who signed up with email and password later uses Google with the same address. Recommend a rule for that and wait for my OK.

Then guide me through the Google Cloud setup one screen at a time: what to create, which addresses go in the authorized origins and redirect fields for local, preview and production, and what "testing" versus "published" means for who can sign in. If a screen may have changed since you learned it, tell me what to look for instead of guessing.

Add the code, keep the secret in an environment variable, and list the checks to run on the live site.

Use it

Open your AI tool (Claude Code, Codex or Cursor) in your project folder and paste it in.

More in Sign-in and accounts