Authentication Building Blocks: Sessions vs Tokens, SSO (SAML & OIDC), 2FA/TOTP, JWT vs PASETO & API Keys

Where session state lives, the five ways to authenticate a REST call (incl. SigV4-style HMAC signing), API-key lifecycle, SSO end to end with SAML and OIDC, single logout, TOTP math, passkeys, PASETO and auth for a multi-app company

About 110 minutes · 17 exam questions · 12 interview questions · 2 code labs

What you will learn

  1. Sessions + cookies vs stateless tokens — where the state lives decides everything
  2. The five REST API authentication methods compared
  3. HMAC request signing, AWS SigV4-style — proof of possession without TLS client certs
  4. API keys vs tokens — app identity, scoping, rotation and the key lifecycle
  5. SSO end to end — IdP vs SP, the IdP session cookie, and why app #2 needs no password
  6. SAML 2.0 SP-initiated flow — AuthnRequest, signed assertion, ACS validation
  7. OIDC authorization code + PKCE vs SAML — side by side, and ID token vs access token
  8. Single logout and session lifetimes — the hardest part of SSO
  9. TOTP step by step — counter, HMAC, dynamic truncation, drift window and replay
  10. MFA beyond TOTP — SMS risk, push fatigue, WebAuthn/passkeys and recovery codes
  11. JWT vs PASETO — algorithm agility as a vulnerability, versions, purposes and footers
  12. Designing auth for a multi-app company — central IdP, token exchange and service-to-service

Previous: Application Security, Secrets & Multi-Tenancy