Sign in with Google and Apple
Let your users sign in with one tap: set up Google Cloud and Apple Developer, step by step.
Your app can offer Continue with Google and Sign in with Apple next to email sign-in. Bloxks writes the buttons and the code; you only need to create the keys on Google’s and Apple’s side, then paste them in Bloxks. Count about 10 minutes for each.
- Google works on iPhone and Android. It opens a secure Google window, then comes back to your app.
- Apple works on iPhone, with Apple’s official button. On Android, your users sign in with Google or email.
Everything happens in Backend, then Users, then Sign-in methods. To add the buttons to your app, just ask in the chat: "add Google and Apple sign-in".
Before you start
In Backend, then Users, open Google or Apple: Bloxks shows your callback URL, which looks like https://xxxx.supabase.co/auth/v1/callback. Keep it at hand, Google needs it.
Google, step 1: create a Google Cloud project
- Open console.cloud.google.com and sign in with your Google account.
- At the top, click the project selector, then New project. Give it your app’s name and click Create.
Google, step 2: set up the consent screen
This is the window your users see when they choose their Google account.
- In the menu, open Google Auth Platform (you can type it in the search bar), then click Get started.
- App information: your app’s name and a support email.
- Audience: choose External, so anyone with a Google account can sign in.
- Contact information: your email. Accept the policy and click Create.
- In Branding, you can add your logo. Optional.
Your app only asks for the name, email and photo of your users. These basic permissions need no review from Google.
Google, step 3: create the Web client
- In Google Auth Platform, open Clients, then Create client.
- Application type: choose Web application (yes, even for a mobile app: the sign-in goes through a secure web window). Name it, for example "Bloxks".
- Under Authorized redirect URIs, click Add URI and paste your callback URL from Bloxks, exactly as it is.
- Click Create. Copy the Client ID (it ends with .apps.googleusercontent.com) and the Client secret right away: Google only shows the secret once.
You don’t need an iOS or Android client, nor any SHA-1 fingerprint.
Google, step 4: paste it in Bloxks
- In Backend, then Users, then Sign-in methods, turn Google on.
- Paste the Web client ID and the Web client secret.
- Click Save sign-in methods.
Google, step 5: open it to everyone
As long as your consent screen is in Testing, only the test users you listed (up to 100) can sign in; others get "Access blocked". When your app is ready:
- In Google Auth Platform, open Audience.
- Click Publish app, then confirm.
Changes on Google’s side can take from 5 minutes to a few hours to apply.
Apple, step 1: turn on Sign in with Apple
You need an Apple Developer account, the same one you publish with, with the Account Holder or Admin role.
- Find your Bundle Identifier in Bloxks, in the Publish window (it looks like com.yourname.yourapp).
- Open developer.apple.com/account, then Certificates, Identifiers & Profiles, then Identifiers.
- Click your app’s identifier. If it isn’t there yet, click +, choose App IDs, then App, and type your Bundle Identifier exactly.
- In Capabilities, check Sign in with Apple (keep Enable as a primary App ID), then Save.
Apple, step 2: paste it in Bloxks
- In Backend, then Users, then Sign-in methods, turn Apple on.
- Click Save sign-in methods.
Bloxks fills the Bundle ID field on its own: your Bundle Identifier as soon as it is chosen in Publish, plus host.exp.Exponent, which lets you test in Expo Go. Nothing to copy.
That’s all for an iPhone app. The Web sign-in (optional) part (Services ID and secret) only matters for signing in from a website: leave it empty.
Test for real
The web preview can’t open Google or Apple sign-in: Bloxks tells you so on screen. Test on your phone:
- Google: in Expo Go, on iPhone or Android, or in TestFlight.
- Apple: on iPhone only, in Expo Go or TestFlight.
When the sign-in works, the new user appears in Backend, then Users.
Apple’s rules to know
- Guideline 4.8: if your iPhone app offers Google, it must also offer an equivalent option that only asks for the name and email and lets people hide their email. Sign in with Apple does exactly that: offer it next to Google, or your app may be rejected.
- The button: Apple’s official button ("Sign in with Apple" or "Continue with Apple", black or white), no smaller than your other sign-in buttons and visible without scrolling.
- The name: Apple only gives the user’s name at the very first sign-in.
- Hidden emails: a user can hide their email; you then get an address ending in @privaterelay.appleid.com. To email them from your own domain, add that domain in Apple’s Sign in with Apple for Email Communication settings (in Certificates, Identifiers & Profiles, then Services).
- Account deletion: an app that creates accounts must let people delete theirs from inside the app (guideline 5.1.1(v)). Ask the chat: "add a delete my account button".
If something doesn’t work
- redirect_uri_mismatch: the URI in your Google Web client isn’t exactly your callback URL. Paste it again, with no extra space or slash.
- invalid_client or deleted_client: the Client ID or secret is wrong, or the client was deleted. Note that Google deletes a client that stays unused for 6 months. Create a new one (Google step 3).
- Access blocked or app not verified: your Google consent screen is still in Testing (Google step 5).
- Provider is not enabled: the Google or Apple switch is off, or you didn’t click Save sign-in methods.
- Unacceptable audience in id_token (Apple): the Bundle ID field doesn’t contain your app’s identifier. Open Backend, then Users, and click Save sign-in methods again: Bloxks adds what is missing.
- The Apple button does nothing on Android: normal, Sign in with Apple is iPhone only.
Still stuck? Describe what you see in the chat, with the exact error message.