Skip to main content
Module 9 · Lesson 3 of 333/42 in the course~22 min
Module lessons (3/3)

OIDC id_token Claims: iss, aud & nonce

Lesson preview6 hands-on exercises readyApplication & Web Security · Module 9 — OAuth 2.1, OIDC & Federated Login Flows

Exploit cross-application OIDC audience confusion and implement a strict fail-closed issuer, audience, azp, nonce, and expiry verifier.

What you'll learn in this lesson

  • Distinguish OAuth 2 Access Tokens (API authorization) from OIDC ID Tokens (authentication claims for your specific client_id).
  • Prevent Cross-App Token Confusion, JWKS header injection (jku/x5u/alg: none), and Replay Attacks caused by skipping iss, aud, azp, or single-use nonce.
  • Build a hardened end-to-end OIDC authenticator verifying header algorithms, claims, and single-use nonce tracking.

Overview

Validating a cryptographic RS256 or ES256 signature only proves which Identity Provider minted the JWT — not that the token is an id_token intended for your application or issued during this fresh login attempt.

Inspect these four examples comparing token confusion against full RFC 7519 / OIDC Core validation:

Sections covered in this lesson

  1. 11. Header Pinning, Audience Arrays & Single-Use Nonces
  2. 22. Interactive Explorer: Cross-App Token Confusion Lab
  3. 33. Progressive Labs: Warm-Up → Attack → Defend → Harden
  4. 44. Checkpoints & Code Review
Pro Lesson · Module 9 — OAuth 2.1, OIDC & Federated Login Flows

Unlock "OIDC id_token Claims: iss, aud & nonce" and the full Application & Web Security curriculum

Exploit cross-application OIDC audience confusion and implement a strict fail-closed issuer, audience, azp, nonce, and expiry verifier.

Unlock all 6 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.

  • Instant access to all advanced modules in Application & Web Security plus 17 more courses
  • Hands-on browser exercises with automated test suites and solutions
  • 14-day money-back guarantee processed via Paddle.com

14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.