Appearance
Return
Enable Google sign in (SSO)
Let users sign in with Google and test the flow in your app.
Steps at a glance ​
- Create a Google OAuth app in the Google Cloud Console.
- Add the right Google origins and callback URLs.
- Paste the Google credentials into WeWeb.
- Add a Google sign-in action to your interface.
- Test the full sign-in flow.
1) Create a Google OAuth app ​
- Open the Google Cloud Console.
- Create a project or select an existing project.
- Open
APIs & Services. - Open
OAuth consent screenand complete the setup:- Choose
Externalfor most public apps. - Add your app name and support email.
- Add your domain in
Authorized domainsif Google asks for it.
- Choose
- Go to
Credentials. - Click
Create credentialsand chooseOAuth client ID. - Choose
Web application. - Keep this page open because you will add your domains and callback URLs in the next step.
2) Add redirect URLs ​
Google needs two values for each place where users can start sign in:
- An
Authorized JavaScript origin - An
Authorized redirect URI
Use this pattern:
| Where users start sign in | Authorized JavaScript origin | Authorized redirect URI |
|---|---|---|
| WeWeb editor project | https://<your-project-id>-editor.weweb.io | https://<your-project-id>-editor.weweb.io/api/auth/callback/google |
| Published app | https://your-domain.com | https://your-domain.com/api/auth/callback/google |
| Preview or staging app | https://your-preview-domain.com | https://your-preview-domain.com/api/auth/callback/google |
- Decide which environments need Google sign in.
- In Google, add each full domain to
Authorized JavaScript origins. - In Google, add the matching full callback URL to
Authorized redirect URIs. - Click
Create. - Copy the
Client IDandClient secret.
WHAT GOOGLE SHOULD RECEIVE
If your app lives at https://my-app.com, the Google callback URL should be:
https://my-app.com/api/auth/callback/google
3) Connect Google in WeWeb ​
- In WeWeb, open
Data & API -> Auth -> Integrating providers. - Open the
Googleprovider. - Turn on
Enable. - Paste:
Client IDs- Your GoogleClient IDClient Secret (for OAuth)- Your GoogleClient secret
- Save your changes.
4) Add Google sign in to your interface ​
- In the
Interfacetab, add a button such asContinue with Google. - Create a workflow on click.
- Add the
Sign in with social provideraction. - Set:
ProviderTogoogleRedirect PageTo the page users should see after sign inError Redirect PageIf you want a dedicated error pageNew User Redirect PageIf you want first-time users to go somewhere different
5) Test sign in ​
- Preview your project.
- Click your Google sign-in button.
- Sign in with a Google account that is allowed to use your Google app.
- Confirm that:
- The Google sign-in window opens without a redirect error.
- You return to the correct page in your app.
- The user is authenticated in WeWeb.
If your Google app is still in testing mode, make sure the Google account you use is added as a test user in the Google Cloud Console.
Common pitfalls ​
Redirect URI mismatch ​
If Google shows a redirect_uri_mismatch error, the redirect URL used by your app does not match what you configured in the Google Cloud Console.
Confirm the value in Authorized redirect URIs is the full callback URL, such as https://your-domain.com/api/auth/callback/google.
Wrong domain or environment ​
If sign in works in one environment but not another, check that:
- Each environment has both entries added in Google.
- The full origin is listed in
Authorized JavaScript origins. - The same origin plus
/api/auth/callback/googleis listed inAuthorized redirect URIs. - You updated Google if you changed your editor domain, preview domain, or custom domain.
Using the success page as the Google callback ​
The Success page in the Sign in with social provider action is not the value you paste into Google.
- Google needs the fixed WeWeb callback URL:
https://<origin>/api/auth/callback/google. - The action page settings only decide where the user lands after that callback is complete.
Missing test users on the Google consent screen ​
If your Google app is still in testing mode, only approved test users can sign in.
- Open
APIs & Services -> OAuth consent screen. - Add your test Google accounts before trying the flow.
Need more detail? ​
For the full setup guide, examples for editor and published domains, and more troubleshooting, see Google authentication ->.

