Express.js (openid-client)
See the Applications overview for prerequisites, configuration endpoints, and available scopes.
openid-client provides a certified OpenID Connect client for Node.js. Key configuration:
- Use
client.discovery()for automatic issuer metadata, thenauthorizationCodeGrant()with PKCE - Manual state, nonce, and PKCE code verifier management
- Store tokens in
express-sessionwithsaveUninitialized: false - Hardware attestation claims (
hardware_verified,hardware_aaguid) are in the access token JWT (RFC 9068) — decode withBuffer.from(token.split('.')[1], 'base64url')
Example
web/express-openid — Complete working example with authorization code flow, PKCE, session management, and token introspection.