# Google Sign-In (Continue with Google)

> A real "Continue with Google" button inside a generated app, and the SHA-1 that makes it work.

- **Applies to:** AppMint and Appwright
- **Source:** the Integration Guide shipped inside the app; this page is generated from it.
- **HTML:** https://freewebtoapk.com/docs/google-sign-in
- **Using AppMint:** wherever the text below says "Appwright", read "AppMint". The two builders share this feature and only the name changes. Steps where the instructions genuinely differ are given separately and labelled.

Add 'Continue with Google' to AI-generated apps using your own Google account - no shared login, no secret in the app

### 1. What this gives your app

Adds a 'Continue with Google' button to apps you generate in AI Studio, so your users sign in with their Google account instead of typing a new email + password.

It's BRING-YOUR-OWN: the button uses YOUR Google sign-in, on YOUR consent screen, for YOUR users. Appwright hosts no login and stores nothing - you paste your Google credentials once and every app you generate can reuse them.

You don't write any code. The AI adds the button and the sign-in logic when you ask for it; the secret never ships inside the app.

### 2. First connect Supabase (required) _(AppMint only)_

Google sign-in for generated apps rides on Supabase Auth, so you must have Supabase connected and enabled first (Settings → BACKEND - SUPABASE). If Supabase isn't active, the Google button won't appear. The chapter '🗄️ Supabase Backend (Connect It Once)' at the top of this guide walks through connecting it.

Why: your users' accounts live in YOUR Supabase project. AppMint pushes your Google credentials into that project automatically on deploy - you never have to flip the Google switch inside the Supabase dashboard yourself.

### 2. First connect Supabase (required) _(Appwright only)_

Google sign-in for generated apps rides on Supabase Auth, so you must have Supabase connected and enabled first (Settings → BACKEND - SUPABASE). If Supabase isn't active, the Google button won't appear.

Why: your users' accounts live in YOUR Supabase project. Appwright pushes your Google credentials into that project automatically on deploy - you never have to flip the Google switch inside the Supabase dashboard yourself.

### 3. Create a Google OAuth client (5 min, free)

On a computer, in the Google Auth Platform console (Google recently moved OAuth setup here from 'APIs & Services'):

1. Open console.cloud.google.com/auth and pick (or create) any project.
2. First time only - configure the consent screen: under 'Branding' add an app name + your support email, and under 'Audience' choose 'External' and either publish the app or add yourself as a test user.
3. Open 'Clients' → click 'Create client'.
4. Application type: choose 'Web application' (NOT Android - the sign-in happens through Supabase on the web).
5. Name it and click 'Create'. You'll get a Client ID (ends in .apps.googleusercontent.com) and a Client secret. Keep this tab open for the next step.

[Open Google Auth Platform → Clients](https://console.cloud.google.com/auth/clients)

### 4. Add your Supabase callback as a redirect URI

This is the step everyone forgets - without it Google shows a 'redirect_uri_mismatch' error.

1. Find your Supabase project ref: it's the '<ref>' part of your project URL https://<ref>.supabase.co (Supabase dashboard → Project Settings → API).
2. Back in the Google OAuth client you just created, under 'Authorized redirect URIs' click 'Add URI' and paste exactly:

```
 https://<ref>.supabase.co/auth/v1/callback
```

1. Replace <ref> with your real project ref and Save.

```
https://<ref>.supabase.co/auth/v1/callback
```

### 5. Paste your credentials into Appwright

In AI Studio, just describe an app that needs accounts and ask for Google sign-in - e.g. 'let users sign in with Google'. The first time, Appwright pops a 'Connect Google sign-in' dialog:

1. Paste your Google OAuth Client ID (…apps.googleusercontent.com).
2. Paste your Google OAuth Client Secret.
3. Tap 'Save & continue'.

They're stored encrypted on your device and reused for every future app - you only paste them once. (Tap 'Skip Google' if you change your mind; the app still builds, just without the button.)

### 6. How it works on a real phone

Google blocks its login screen inside an in-app WebView, so Appwright handles it the safe way automatically - nothing for you to configure:

- Tapping 'Continue with Google' opens the real browser for the consent screen.
- After the user approves, it returns to your app through a secure deep link and finishes the sign-in.

This works in BOTH the live Preview and the installed APK. Each generated app uses its own private return link, so multiple Appwright-made apps never collide.

### 7. Verify it works

1. Open your app (Preview or installed APK) and tap 'Continue with Google'.
2. The browser opens, you pick your Google account, and you're returned to the app, signed in.
3. In your Supabase dashboard → Authentication → Users, your Google account now appears.

If it works in Preview it will work in the built APK - the flow is identical.

### 8. If something doesn't work

- 'redirect_uri_mismatch' → the redirect URI in step 4 doesn't exactly match. It must be https://<ref>.supabase.co/auth/v1/callback with YOUR ref, no trailing slash, no typos.

- Button doesn't appear → Supabase isn't active (step 2), or you tapped 'Skip Google'. Re-open the app description with Google sign-in requested.

- 'Access blocked: app not verified' → your OAuth consent screen is still in Testing. Add your Google account as a test user, or publish the consent screen.

- Only Google is offered - Facebook / Apple / X (Twitter) sign-in is NOT supported. They need OAuth popups that Android WebView blocks. Email/password still works alongside Google.

- Offline (no-backend) apps get no social login at all - there's no Supabase to authenticate against.

