Prompt
How do I let users sign up with Google, Apple, and email in one flow?
Latest observation
The simplest way is to treat Google, Apple, and email/password as three identity methods for the same account system, then unify them into one user record after verification.
Recommended signup flow
1) Show one signup screen
Offer:
- Continue with Google
- Continue with Apple
- Sign up with email
Keep them all on the same screen, so it feels like one flow.
2) Create or link to a single internal user
No matter how they sign up, store one app user ID internally, then attach one or more login identities to it.
Example schema:
- users
- id
- name
- email_verified
- created_at
- auth_identities
- id
- user_id
- provider (
google,apple,email) - provider_subject_id
- created_at
This lets one user have:
- Google identity
- Apple identity
- email/password identity
3) Handle each method
Google / Apple
- User authenticates with provider.
- You receive verified profile info:
- provider user ID
- name maybe
- Check if an account already exists:
- by provider identity
- optionally by verified email
- If found, sign them in.
- If not found, create a user + identity link.
Email signup
- User enters email + password.
- Create account in a “pending verification” state.
- Send verification email.
- After verification, activate account.
- Optionally let them later connect Google/Apple.
Important account-linking rule
Use provider subject ID as the primary unique key for social logins, not just email.
Why:
- Apple may hide the real email.
- Google email can change.
- Same person may use different emails across providers.
So:
- Google login: unique by Google
sub - Apple login: unique by Apple
sub - Email login: unique by your email/password record
If you want automatic linking by email, only do it when the email is verified by the provider or by your own email verification.
Best UX pattern
Option A: “One account, multiple sign-in methods”
After signup, show a page:
- “You can also add Google”
- “You can also add Apple”
- “Add password for email login”
This is the safest and most common.
Option B: “Sign up with any method, then ask for email”
Useful if Google/Apple don’t provide enough info or you need email for notifications.
Flow:
- User uses Google or Apple.
- Create account.
- Prompt for missing fields if needed.
- Verify email if required.
Avoid these mistakes
- Don’t create separate accounts just because the same email appears in Google and Apple.
- Don’t use email alone as the unique login key.
- Don’t trust unverified emails from OAuth providers unless the provider confirms verification.
- Don’t force users to re-enter everything after OAuth unless necessary.
If you’re building it yourself
You’ll need:
- OAuth/OIDC for Google
- Sign in with Apple
- Password auth with hashing (Argon2/bcrypt)
- Account linking logic
- Email verification
- Session/token management
If you want the fastest implementation
Use an auth provider like:
- Auth0
- Clerk
- Firebase Auth
- Supabase Auth
- Cognito
These usually support:
- Apple
- email/password
- account linking
If you want, I can also sketch:
- a database design,
- a backend flowchart, or
- example code for a specific stack like Next.js, Firebase, Supabase, Django, or Node/Express.