Supabase Backend
Authentication
Configure Email, Google, and Apple Sign-In for your app.
Launch-Native comes pre-configured with Supabase Auth. By default, the boilerplate supports Email/Password, Google, and Apple Sign-In. Here is how to set them up in your Supabase dashboard.
1. Email & Password
Email authentication is enabled by default in Supabase, but you might want to tweak a few settings for a smoother development experience.
- Go to Authentication > Providers in your Supabase dashboard.
- Click on Email to expand the settings.
- For development: We highly recommend turning off "Confirm email". This allows you to create test accounts and log in immediately without needing to check an inbox.
- (Don't forget to turn it back on before launching your app to production!)
2. Google Sign-In
To enable Google Sign-In on mobile (iOS & Android), you need to create OAuth credentials in the Google Cloud Console.
- Go to the Google Cloud Console and create a new project.
- Navigate to APIs & Services > Credentials.
- Create three separate OAuth 2.0 Client IDs:
- Web application: (Required by Supabase and Expo Go).
- Android application: (Requires your app's SHA-1 certificate fingerprint).
- iOS application: (Requires your app's Bundle ID).
- Copy the Web Client ID and Client Secret.
- Go back to Supabase > Authentication > Providers > Google.
- Turn the toggle on, paste the Web Client ID and Secret, and click Save.
- Open your mobile app's
.envfile and add your client IDs:
EXPO_PUBLIC_GOOGLE_IOS_CLIENT_ID=your_ios_client_id_here
EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID=your_web_client_id_here3. Apple Sign-In
⚠️ Note: Apple Sign-In is strictly required by Apple App Store guidelines if you offer any other third-party social login (like Google).
- Go to your Apple Developer Account.
- Navigate to Certificates, Identifiers & Profiles > Identifiers.
- Ensure Sign In with Apple is enabled for your primary App ID.
- Create a Services ID for your app and configure it with your Supabase project domain (e.g.,
your-project.supabase.co). - Generate a Private Key for Sign In with Apple and download the
.p8file. - In Supabase > Authentication > Providers > Apple:
- Turn the toggle on.
- Enter your Services ID.
- Enter your Team ID (found in your Apple Developer account top right corner).
- Open your downloaded
.p8file in a text editor and paste its contents into the Secret Key field. - Enter your Key ID.
- Click Save.
Your app is now fully equipped to authenticate users natively and securely!
