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 authentication vs authorization?

Signing in is only half of security. Authentication answers "who are you?", authorization answers "are you allowed?", and most real data leaks come from skipping the second.

Startbase Team
Editorial ink illustration of a hotel desk bell and a brass room key, the key tag in ember orange

Key takeaways

  • Authentication (authn) verifies identity: password, magic link, Google sign-in. Authorization (authz) checks permission for each action.
  • Authorization must be enforced on the server or in the database, never only by hiding buttons in the frontend.
  • A 401 error means "we do not know who you are"; a 403 means "we know, and the answer is no."

In one line: authentication proves who a user is, and authorization decides what that user is allowed to do. Logging in with a password is authentication; being able to edit your own posts but not someone else's is authorization. People shorten them to "authn" and "authz," and confusing the two is behind a large share of real-world data leaks.

An everyday example: checking into a hotel

At the front desk you show your passport. The clerk checks your face against it: that is authentication. Then you get a key card. It opens room 314, the gym and the lift to your floor, but not room 315 or the staff office: that is authorization. The card does not prove who you are each time; it carries what you are allowed into. And crucially, each door checks the card itself. A sign saying "guests only" would not stop anyone.

How the two look in a real app

Take a small team task tracker:

  • Authentication: a user signs in with email and password, a magic link or Google. The app now knows this request comes from user `u_204`.
  • Authorization, by ownership: `u_204` can edit tasks where `owner_id = u_204`.
  • Authorization, by membership: `u_204` can see tasks in projects where they appear in `project_members`.
  • Authorization, by role: only users with role `admin` can delete a project or invite people.

Authentication happens once per session. Authorization happens on every request: every read, every save, every delete. That is why it needs to live where users cannot tamper with it.

Where each check belongs

The frontend can hide a Delete button from non-admins, and it should, for a clean interface. But anyone can open developer tools and send the delete request anyway. Real authorization is enforced on the server (in an API or edge function) or in the database itself through row-level security policies. The Startbase security practices page puts it plainly: use frontend auth state only for rendering the interface, never for access control, and check roles and permissions server-side.

Why it matters when building with Startbase

Startbase Cloud handles both halves. For authentication, the Auth section offers email and magic link sign-in, Google, Apple, phone, anonymous users and an invite-only mode (auth docs). You can change a user's role between Member and Admin there; it is stored in the user's app metadata for your app to check. For authorization, the agent turns on row-level security for every table it creates, with policies that match how your app signs people in, and the check before every publish flags tables with it turned off. Your job is to describe the rules clearly.

Add sign-in with email and Google. Users belong to workspaces. Members can see and edit tasks in their own workspaces only; only workspace admins can delete tasks or invite people. Enforce these rules in the database with row-level security, not just in the interface, and show me the policies you created.

Go deeper with user authentication explained and row-level security explained.

Common confusions

  • 401 versus 403. HTTP status 401 (named "Unauthorized," confusingly) really means unauthenticated. 403 Forbidden means authenticated but not permitted.
  • OAuth is mostly about authorization. It was designed to grant an app access to your data elsewhere; sign-in on top of it is a layer called OpenID Connect.
  • "Logged in" is not "allowed." Every signed-in user should still only reach their own rows.

Frequently asked questions

Which comes first, authentication or authorization?

Authentication. The app has to know who you are before it can decide what you may do. Public pages skip both; everything private needs both.

Is hiding a page enough to protect it?

No. Hiding a link only changes the interface. The data behind it must be protected by checks on the server or row-level security in the database.

What is role-based access control?

A form of authorization where permissions attach to roles like member, editor or admin, and users get roles. It is simpler to manage than per-user permissions once a team grows.

On this page

  • An everyday example: checking into a hotel
  • How the two look in a real app
  • Where each check belongs
  • Why it matters when building with Startbase
  • 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.