Email sign-in works, so you add "Sign in with Google" and it works on your laptop. Then it fails on the live site, or a user gets locked out, or Apple rejects your iOS app. Most of these problems are settings, not code. Here is what I would check, with each fact taken from the provider's own docs. Provider rules change, so open the linked page before you rely on a detail.
Short answer: register every exact callback URL for every environment; move the Google consent screen out of "Testing"; if you ship an iOS app with Google or Facebook login, add Sign in with Apple; decide what happens when the same email arrives from two providers; and test inside in-app browsers, not only in Chrome.
1. Redirect URIs must match exactly
The most common error is redirect_uri_mismatch. Google's OAuth guide says the URI in the request must exactly match one of the authorized redirect URIs for the client, and that scheme, case and trailing slash must all match.
That means each of these needs its own entry:
http://localhost:3000/...for development- each preview deploy URL, or a pattern that covers them
- the production domain
wwwand non-wwwas two different addresses
The tool you use for auth has its own list on top of the provider's list. Supabase has a redirect URL allow list. It supports wildcards, and its guide shows patterns for Netlify and Vercel preview deploys. It recommends exact paths for production rather than broad patterns. Firebase has authorized domains: its Google sign-in guide says that to use a custom domain you add it to the authorized domains list in the Firebase console.
Hosts such as Netlify and Vercel give each preview deploy its own URL. A login that works on the live site can fail on a preview for this reason alone, and a new domain or a www redirect can break it the same way.
2. Google: leave "Testing" before real users arrive
Google's OAuth consent help page describes two publishing statuses:
- Testing. Only test users you list on the consent screen can sign in, up to 100.
- In production. Any Google account can authorize the app. You switch with the Publish app button.
The page also says that apps asking only for basic profile scopes (email, profile, OpenID) are an exception: test users do not need to be listed, and authorizations do not expire after 7 days. Ask for any other scope and that exception ends. For other scopes, Google may show an "unverified app" warning until the app is verified, and unverified apps that request unapproved sensitive or restricted scopes are capped at 100 new users over the project's lifetime. So for sign-in only, ask for email and profile and nothing else. Every extra scope (calendar, Drive, Gmail) adds a review.
The same page says the project's name and logo may be subject to verification before they are shown on the consent screen. Check what your users will see before you launch.
3. Apple: the rule and the private email
Apple's App Review Guideline 4.8 says that an app which uses a third-party or social login service (it lists Facebook Login, Google Sign-In, Log in with X and others) to set up or authenticate the user's primary account must also offer another login service as an equivalent option. That service must limit data collection to name and email, let users keep their email private, and not collect app interactions for advertising without consent. Sign in with Apple is built for this. The guideline lists exceptions, such as an app that only uses its own account system, or an education or enterprise app that requires an existing school or company account. Read them if you think you are exempt.
Two practical points when you add Sign in with Apple:
- Hide My Email. The user may give you a private relay address instead of their real one. Apple's relay service page says you must register your outbound email domains, and that registered domains need SPF records to pass through the relay. Mail from a domain you did not register bounces. If your sign-up or reset emails come from an unregistered domain, these users get nothing. See SPF, DKIM and DMARC for app emails.
- The name arrives once. Supabase's Apple guide says Apple only provides the user's full name during the first sign-in. Save it then. A later sign-in returns nothing for the name.
4. Same email, different provider
A user signs up with email and password. Next month they click "Sign in with Google" with the same address. What happens depends on your auth tool:
- Supabase links identities with the same email address to a single user automatically. Its page warns that linking to a user with an unverified email address would be insecure because of pre-account takeover risk.
- Firebase can be set to one account per email address. Its Google sign-in guide says the
auth/account-exists-with-different-credentialerror is thrown when the email already belongs to an account with another provider, and that the user must sign in with the existing provider and then link the new credential. With the redirect flow you also have to keep the pending credential between page loads.
Test both orders: email first then Google, and Google first then email. Check your database for two user rows with one email. Duplicate accounts mean split data, and wrong linking means someone can reach an account that is not theirs. For more on that risk, see database security checks for AI-built apps.
5. Facebook: a deletion page is required
Facebook's data deletion documentation says apps that access user data must give people a way to ask for deletion. In the app's basic settings you give either a data deletion callback URL or a deletion instructions URL. Implementing the callback itself is optional.
On permissions, Facebook's Login overview says any app can ask for public_profile and email without review. Every other permission needs App Review, and advanced access can also require business verification. For plain sign-in you rarely need more.
6. X: check the cost first
X's API pricing page says the X API uses pay-per-usage pricing, with credits bought up front and no subscriptions. I could not confirm from that page how "Log in with X" itself is billed, so check the current X developer docs before you promise it to users.
7. GitHub: OAuth app or GitHub App
For "Sign in with GitHub" a plain OAuth app is the usual start. GitHub's comparison page says GitHub Apps are generally preferred, mainly for finer permissions and short-lived tokens, so read it if your app will also work with repositories. GitHub's OAuth app setup says you can enter up to 10 callback URLs, and the redirect has to match what you registered. Check the current docs for how matching works on your app, as GitHub has changed it for older apps with a single callback URL.
8. Test checklist before launch
- Fresh browser. Use a private window with no old sessions. Your own browser hides first-time problems.
- Every environment. Local, a preview deploy, production, and both
wwwand non-www. - Every provider on phone and desktop. Many people will sign in on a phone, where the flow often looks different.
- In-app browsers. Open your link from Instagram or Facebook. Google's OAuth policies say apps must not send a Google OAuth request to an embedded user-agent. Those in-app browsers are usually of that kind, though Google does not name them on that page, so test it. A common fix is a banner that asks the user to open the page in Safari or Chrome.
- Redirect flow on custom domains. Firebase's redirect best practices say redirect sign-in does not work in browsers that block third-party storage, and that apps on a custom domain need extra setup. Test in Chrome, Safari and Firefox.
- Sign out, sign in again. The second sign-in differs from the first, as Apple's name shows.
- Same email, two providers. See section 4.
- Delete account. Check that the user's data is removed and that signing in again with the same provider starts clean.
Email and password sign-in has its own safety settings, such as rate limits, leaked password checks and MFA: see securing the login of your app.
What I did on my own app
On my music app TuneCraft (tunecraft.music) I added Google sign-in with Firebase, using the redirect flow. I am now adding GitHub, Facebook and X buttons there as a test before I use them on other apps. Each provider needed its own developer-console registration, and the account owner has to do that. It cannot be done from code, so ask your developer early who owns the provider accounts.
Want this set up or fixed?
I add and fix social sign-in in apps built with Lovable, Bolt, Cursor or Replit, and test each provider the way real users meet it. For the wider launch picture, see the launch-ready checklist, or send me the details on the hire page and I'll reply within 24 hours.