How software works · Guide for product managers

Authentication and authorization for product managers

Sign-in is the first thing every user touches and one of the easiest places to ship a serious bug. This guide separates the two ideas engineers keep saying together — authentication and authorization — and explains the building blocks well enough for you to write good requirements and review what an AI agent builds.

Guide 4 of 10 in the technical PM path

11 min read · Updated · By the TechPMer team

Why a PM should care

Auth decisions show up everywhere in the product:

Authentication vs authorization

The two words sound alike and mean different things:

An analogy: at an office building, showing your badge at the entrance is authentication. Whether your badge opens the server room is authorization. Many bugs come from checking the first and forgetting the second.

Ways users sign in

Method How it works Trade-offs
Email + password User creates a password; the server stores a hash, never the password itself Familiar; needs reset flows, breach protection and rate limiting
Magic link / email code A one-time link or code is emailed No password to forget; depends on email delivery speed
Social login (OAuth) "Continue with Google / Apple / GitHub" Fast sign-up; you depend on the provider; some users avoid it
SSO (SAML / OIDC) Sign in through the company's identity provider (Okta, Microsoft Entra ID, Google Workspace) Required by many B2B customers; more setup per customer
Passkeys A key stored on the user's device, unlocked with fingerprint, face or PIN Phishing-resistant and fast; still new to many users
Multi-factor (MFA / 2FA) A second proof — an authenticator app code or a security key Much safer; adds friction, needs recovery options

Most products combine two or three of these. Building your own password system from scratch is rarely a good idea; teams usually rely on an auth provider or a well-tested library.

Sessions, cookies and tokens

After someone signs in, the app needs to remember them on every following request. Two common approaches:

Both are fine when done well. What matters for product decisions:

OAuth and OpenID Connect in one paragraph

OAuth 2.0 lets a user give an app limited access to their account somewhere else without sharing the password — "Allow this app to read your calendar". OpenID Connect (OIDC) is a layer on top of OAuth used for signing in — "Continue with Google". When engineers mention scopes, they mean the specific permissions requested (read calendar vs. manage calendar). Asking for fewer scopes means fewer scary consent screens and less risk.

Authorization: roles and permissions

Once you know who someone is, you decide what they can do. Common models:

The most important technical rule: authorization must be enforced on the server (or in database rules), not only by hiding buttons in the UI. Hiding the "Delete" button is good UX; it is not security. Anyone can send the request directly.

A classic bug, often called IDOR (insecure direct object reference): the app loads /api/invoices/1042 for a logged-in user but never checks that invoice 1042 belongs to them. Change the number in the URL and you see someone else's invoice.

What engineers may tell you

Questions a good technical PM asks

  1. Which sign-in methods do we support, and why those?
  2. How long do sessions last, and can a user sign out of all devices?
  3. What is the account recovery flow if someone loses access to their email or second factor?
  4. Where is each permission enforced — server, database rules, or only the UI?
  5. What roles exist, and who can change someone's role?
  6. Do we log important security events (sign-ins, role changes, exports)?
  7. What does a user see when their session expires in the middle of work?

Red flags

Using an AI coding agent for auth

Ask the agent to use an established auth provider or library rather than inventing one, and be explicit about authorization:

Use the existing auth provider for sign-in (email link + Google).
Authorization rules:
- A user can read and edit only projects where they are a member.
- Only the project owner can delete a project or change member roles.
Enforce these rules on the server / in database security rules, not only in the UI.
Add tests that prove a non-member gets 403 when reading another project by ID.

Then test it like an attacker would, gently: open a record as user A, copy its URL, sign in as user B and paste it. If B can see it, the authorization is missing.

Try it yourself

Pick one feature in your product and write a tiny permission table: rows are actions (view, create, edit, delete, invite), columns are roles (owner, admin, member, guest). Fill in yes/no. You will probably find at least one cell nobody has decided — and that is exactly the conversation to have with your engineers.

In the TechPMer course, week 7 (“Data & User Accounts”) adds real sign-in and data security rules to your own project with an AI coding agent, including a review checklist.

Start with week 1 — free

No credit card. Open the first week as a guest, create a free account to save progress and unlock week 2 and the AI mentor.

Start learning Compare plans