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
GlossaryNovember 22, 20263 min read

What is OAuth?

Behind every "Sign in with Google" button is OAuth: a way to hand an app a limited valet key instead of your real password. The flow in five steps, and why redirect URLs break it.

Startbase Team
Editorial ink illustration of a valet key on a ring beside a full car key, the valet key in ember orange

Key takeaways

  • OAuth is a standard for granting an app limited access to an account on another service without sharing the password.
  • Social sign-in uses OAuth plus OpenID Connect: the provider confirms identity and returns tokens to your app.
  • Most setup failures are a redirect URL that does not exactly match what is registered with the provider.

OAuth is an open standard that lets one app get limited access to your account on another service (Google, GitHub, Apple, Spotify) without ever learning your password. The version in use today is OAuth 2.0. Every "Sign in with Google" or "Connect your calendar" button you have clicked runs on it.

An everyday example: the valet key

Some cars come with a valet key. It starts the engine and opens the door, but it cannot open the trunk or the glovebox. You hand it to the parking attendant instead of your full key ring. OAuth works the same way: instead of giving a scheduling app your Google password, you approve a screen that says "This app wants to see your calendar events," and Google hands the app a token that can do exactly that and nothing else. You can take the key back later from your Google account settings without changing your password.

The flow in five steps

  1. 01The user taps Sign in with Google in your app.
  2. 02Your app redirects them to Google with your client ID, the permissions it wants (called scopes, such as email and profile) and a redirect URL to come back to.
  3. 03The user signs in at Google, on Google's page, and approves.
  4. 04Google sends the user back to your redirect URL with a short-lived code.
  5. 05Your backend exchanges that code, together with your client secret, for tokens. Your app now knows who the user is.

The password is only ever typed into Google. Your app receives tokens with an expiry and a limited scope. When the purpose is signing in rather than reading someone's files, a thin layer on top called OpenID Connect adds an ID token that says who the user is, usually as a JWT.

Why it matters when building with Startbase

In Startbase Cloud, Google sign-in is a toggle in the Auth section's sign-in settings: you paste the client ID and secret you created in Google's developer console. Apple sign-in takes a Services ID and a secret JWT. Saved provider secrets are never displayed again. The same screen has a URLs panel where you set your Site URL and the redirect URLs allowed after sign-in (auth docs). That panel matters more than people expect, because of the error below.

Add "Continue with Google" next to email sign-in on the login screen. After sign-in, send new users to a short profile setup page and returning users to their dashboard. Tell me exactly which redirect URLs to add in Google's console and in the Auth URLs panel for both the preview and my published address.

For the wider picture of sign-in methods, read user authentication explained. Your client secret is a secret like any other: see API keys and secrets.

Setup errors you will probably meet

  • redirect_uri_mismatch. The redirect URL your app sent does not match one registered with the provider, character for character. `https://` versus `http://`, `www` versus no `www` and a trailing slash all count. Register both your preview and live addresses.
  • Works in testing, fails for everyone else. Google keeps new OAuth apps in a testing mode limited to listed test users until you publish the consent screen.
  • Sign-in loops back to the login page. Usually the Site URL still points at an old address, so the session lands on the wrong domain.

Common confusions

  • OAuth is not a login system on its own. It was built for delegated access; sign-in identity comes from OpenID Connect on top.
  • The client secret is not the user's password. It identifies your app to the provider and must stay on the server.
  • Scopes should be minimal. Asking for full Drive access when you only need an email address scares users off the consent screen.

Frequently asked questions

Is OAuth safer than email and password?

For your app, often yes: you never store a password, and the provider handles two-factor checks and suspicious sign-ins. The trade-off is depending on that provider being available.

Do I need a privacy policy for Google sign-in?

Google asks for a privacy policy link and app details on the consent screen before your app can leave testing mode, so plan to have one.

On this page

  • An everyday example: the valet key
  • The flow in five steps
  • Why it matters when building with Startbase
  • Setup errors you will probably meet
  • Common confusions

Keep reading

More in Glossary
Editorial ink illustration of a hand-cranked music box drum plucking a metal comb, the crank handle in ember orange
GlossaryNovember 22, 2026

What is a game loop?

Every real-time game runs one repeating cycle: read input, update the world, draw it. Here is what that cycle looks like and why it decides how your game feels.

3 min read
Editorial ink illustration of a brass stopwatch beside a small wind-up toy car, the second hand in ember orange
GlossaryNovember 22, 2026

What is delta time?

Delta time is the number that keeps your game the same speed on every screen. Here is how to use it, where it breaks, and how to spot a game that forgot it.

3 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.