Skip to content
AI-powered appsNewChat, vision, voice, generationBookings & schedulingAppointments that book themselvesShops & sellingA storefront in every pocketClient & businessRun the operation from one placeCommunities & clubsA home that is not a group chat
Health & wellnessHabits, tracking and calmGames2D, 3D and multiplayerPersonal & toolsThe tool you wish existedInternal toolsThe tool ops never had time for
See all use cases
ArcadeNewPricingSecurity
EngineThe game engine and World EditorHow it worksFrom one sentence to a live productDocsGuides for building and publishingBlogStories, guides and newsChangelogWhat shipped latelyStatusUptime of every serviceSupportGet help from the team
AI-powered appsBookings & schedulingShops & sellingClient & businessCommunities & clubsHealth & wellnessGamesPersonal & toolsInternal tools
See all use cases
ArcadeNewPricingSecurity
EngineHow it worksDocsBlogChangelogStatusSupport
Language
Blog
IntegrationsNovember 22, 20265 min read

Add Sign in with Google

One button, no password to remember, and a verified email for you. Here is the Google side, the app side, and the redirect settings behind most failed first attempts.

Startbase Team
Editorial ink illustration of a coat check counter with a numbered brass token handed across it and coats hanging behind, the brass token in ember orange

Key takeaways

  • You need a Google Cloud project, a configured consent screen and an OAuth client of type Web application. It is free.
  • On Startbase Cloud, paste the client ID and secret into Sign-in settings, then set your Site URL and allowed redirect URLs.
  • redirect_uri_mismatch and "only test users can sign in" are the two classic blockers, and both are settings, not code.

To add Sign in with Google, create an OAuth client in the Google Cloud console (free with any Google account), configure the consent screen users will see, and register your backend's auth callback as an authorized redirect URI. Then give the client ID and client secret to your auth system. On Startbase Cloud that means pasting them into the Google provider in the Users section's Sign-in settings and listing your site's addresses in the URLs panel. Your app shows a "Continue with Google" button; Google handles the password and two-factor check and hands back a verified email and name.

What you will build

A sign-in screen with "Continue with Google" above (or beside) your email option. First-time users get an account created automatically with their name, email and profile photo; returning users land back where they were. You can see each user's sign-in method in the Users table of your backend. For a primer on what is happening under the hood, what is OAuth explains the redirect dance in plain words.

What you need

  • A Google account to sign in to the Google Cloud console. A Workspace account works too; if you use one, you can limit sign-in to your own organization, which is handy for internal tools.
  • Startbase Cloud enabled on the project, which provides the auth system and the Sign-in settings where the credentials go.
  • Your app's addresses: the published startbase.app address, any custom domain, and the backend's auth callback URL (it ends in /auth/v1/callback; ask the agent for the exact address for your project).
  • A privacy policy URL and a support email for the consent screen. Google shows these to users. Privacy policy for your app covers what it should say.

The Google side, step by step

Google rearranges its console from time to time, so labels may differ slightly, but the steps have been stable for years:

  1. 01Create a project in the Google Cloud console, named after your app.
  2. 02Configure the consent screen. Choose External (anyone with a Google account) unless the app is only for your Workspace organization. Enter the app name users will see, a support email, your logo if you want one, your home page and privacy policy links, and your app's domain under authorized domains.
  3. 03Scopes. Keep to the basics: openid, email and profile. Asking for more (Calendar, Drive) triggers Google's verification review and scares users at the consent step.
  4. 04Create credentials. Choose OAuth client ID, application type Web application.
  5. 05Authorized JavaScript origins. Add the addresses your app runs on, such as https://yourapp.startbase.app and https://yourdomain.com.
  6. 06Authorized redirect URIs. Add your backend's auth callback URL. This is where Google sends users after they approve, and it must match exactly, including https and the path.
  7. 07Copy the client ID and client secret. The secret is shown once in some console versions, so store it somewhere safe right away.

The app side

  1. 01In your project's backend, open Users, then Sign-in settings, switch on Google OAuth and paste the client ID and secret. Saved secrets are never displayed again; leaving a field empty when you save keeps the stored value.
  2. 02In the URLs panel, set the Site URL to your main published address and add every address users might sign in from to the allowed redirect URLs: the startbase.app address, the custom domain, and any specific return pages.
  3. 03Ask the agent to add the button and the post-sign-in behavior (where new users go, where returning users go, how the profile is filled from Google's name and photo).

Tip

Keep email sign-in on alongside Google. Some users do not have or do not want to use a Google account, and email (with password or magic link) is on by default in Startbase Cloud.

The data flow

  1. 01The user taps Continue with Google. Your app asks the auth system to start a Google sign-in, with the page to return to.
  2. 02The browser goes to Google, which shows your consent screen (only the first time) and checks the user's password and second factor.
  3. 03Google redirects to your backend's callback with a one-time code. The auth system exchanges it with Google, using your client secret, for the user's verified identity.
  4. 04The auth system creates or finds the user, starts a session, and redirects to an allowed URL in your app. Your app reads the session and shows the signed-in state.

Your client secret is used only in step 3, server to server. It never reaches the browser, which is why it lives in the backend settings rather than in your app's code.

A brief you can paste

Add Continue with Google to the sign-in and sign-up screens, above the email form, using Google's standard button style. I have enabled the Google provider in Sign-in settings. After a first sign-in, create a profile row from the Google name and avatar and send the user to /welcome to choose a username; returning users go back to the page they came from, or /home. If sign-in fails or is cancelled, return to the sign-in screen with a short friendly message, never a raw error. Tell me the exact auth callback URL I need to add as an authorized redirect URI in Google Cloud, and which addresses to list as JavaScript origins and in the URLs panel.

Pitfalls

  • Error 400: redirect_uri_mismatch. The callback URL in Google Cloud does not exactly match what your backend sent. Copy it again; check https, trailing slashes and the full path.
  • "Access blocked" or only some people can sign in. A consent screen in Testing status only admits the test users you listed. Publish it to production when you launch. Apps using only basic scopes usually go live without a long review, though Google may ask you to verify your branding.
  • Landing on the wrong site after sign-in. The Site URL still points at an old or preview address, or the page you return to is not in the allowed redirect list. Fix both in the URLs panel.
  • Forgetting the custom domain. When you add a domain later, add it to Google's JavaScript origins and to the URLs panel the same day, or sign-in breaks only for visitors using the new address.
  • Same email, two methods. Someone signs up with email, then later taps Google with the same address. Decide what should happen and test it before launch, so they do not end up with two accounts or locked out.
  • Mobile apps. In an Expo app, Google sign-in has to return into the app rather than a web page, which needs the app's own redirect address added to the allowed list. Test it on a real phone; it behaves differently from the web preview.

Sign in with Google covers most users on Android and desktop. If many of yours are on iPhone, Sign in with Apple is the natural companion, and our overview of user authentication compares all the methods.

Frequently asked questions

Is Sign in with Google free?

Yes. Creating a Google Cloud project and an OAuth client for basic sign-in (email and profile) costs nothing.

What does redirect_uri_mismatch mean?

The redirect address your app sent to Google is not in the OAuth client's list of authorized redirect URIs. Add your backend's auth callback URL exactly as it appears, including https and the full path.

Why can only some people sign in with Google?

The consent screen is probably in Testing status, which only admits listed test users. Move it to production in the Google Cloud console when you launch.

Where do I put the Google client secret?

In your auth provider settings on the backend, never in frontend code. On Startbase Cloud it goes into the Google provider under Users, Sign-in settings, and is never displayed again after saving.

On this page

  • What you will build
  • What you need
  • The Google side, step by step
  • The app side
  • The data flow
  • A brief you can paste
  • Pitfalls

Keep reading

More in Integrations
Editorial ink illustration of a folded paper street map with a brass compass and pushpins, the center pushpin in ember orange
IntegrationsNovember 22, 2026

How to add a map to your app

A map is two jobs: drawing tiles in the browser and turning addresses into coordinates. One key can be public, the other never should be.

6 min read
Editorial ink illustration of a carrier pigeon on a windowsill with a rolled note tied to its leg, the note in ember orange
IntegrationsNovember 22, 2026

How to send SMS from your app

Sending one text is ten lines of code. Sending texts people agreed to, that arrive, and that nobody can abuse, is the real work.

5 min read

Read less. Ship more.

Everything in this post is one prompt away. Describe your app and watch it build.

Start building

Apps, games, backends and publishing from one conversation.

Product

  • Features
  • Use cases
  • Pricing
  • Changelog

Resources

  • Blog
  • Docs
  • Support
  • Status
  • Security

Contact

  • w@startbase.ai
  • X / Twitter
  • LinkedIn
  • Instagram

Legal

  • Terms
  • Privacy

© 2026 Startbase. All rights reserved.