Authentication is the part of an application where small mistakes become serious breaches. Many tutorials store JWTs in the wrong place, skip token revocation or misuse OAuth flows. This course explains how each approach works, which one fits which situation, and how to implement it safely, ending with passwordless login using passkeys.

What you'll learn

  • Authentication versus authorisation, and the main threats: credential stuffing, session hijacking, CSRF and XSS
  • Storing passwords safely with Argon2id or bcrypt, and password policies that help rather than hinder
  • Server-side sessions and secure cookie settings: HttpOnly, Secure and SameSite
  • JWTs: structure, signing algorithms, validation, expiry and common mistakes
  • Access and refresh tokens, rotation and revocation
  • OAuth 2.0 flows, especially authorisation code with PKCE, and why the implicit flow is no longer recommended
  • OpenID Connect for "Sign in with Google" and other identity providers
  • Multi-factor authentication with TOTP apps and recovery codes
  • Passkeys with WebAuthn: registration, sign-in and account recovery
  • When to use a managed identity provider instead of building your own

Who it's for

  • Backend and full-stack developers building login for web or mobile apps
  • Developers integrating social login or single sign-on
  • Teams reviewing an existing authentication system for weaknesses

Prerequisites

  • Experience building a web app with a backend in any language
  • Basic HTTP knowledge: headers, cookies and status codes
  • Awareness of common web vulnerabilities helps (see Web Application Security (OWASP Top 10))

Outcomes

By the end of this course you will be able to:

  1. Choose between sessions and tokens for a given app and justify the choice.
  2. Implement OAuth 2.0 and OpenID Connect login with PKCE correctly.
  3. Add multi-factor authentication and passkeys to an existing login.
  4. Review an authentication flow and identify common security flaws.

Course outline

ModuleTopic
1Threats and principles of authentication
2Password hashing and account flows
3Sessions and secure cookies
4JWT in depth
5Access tokens, refresh tokens and revocation
6OAuth 2.0 and the authorisation code flow with PKCE
7OpenID Connect and social login
8Multi-factor authentication
9Passkeys and WebAuthn
10Authorisation: roles, permissions and policies
11Managed identity providers and single sign-on
12Project: auditing and hardening a login system

FAQ

Should I store JWTs in localStorage?

Usually not for browser apps, because any XSS bug can read them. We compare this with HttpOnly cookies and backend-for-frontend patterns.

Which language are examples in?

Mainly TypeScript with Node.js, with notes for PHP and Python. The concepts apply to any stack.

Will this make my app compliant with security regulations?

It covers good engineering practice, not legal compliance. For regulatory requirements, consult a qualified security or compliance professional.

How do I join?

Get in touch and we'll share the current format, schedule and enrolment details.