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
Test password reset and email verification end to end
The happy sign-up works, and the reset link is broken, expired or reusable.
Stop users getting logged out at random
People are signed out mid-task, or stay signed in forever on a shared computer.
Make sure admin powers are checked on the server
The admin page is hidden from normal users, and the role is read from something the browser controls.
Sign-in works locally and fails on the live site
You land back on localhost, hit a redirect error, or stay signed out after logging in.