Used this library to implement an Authorization Code + PKCE flow with state and nonce against a standard OIDC provider: issuer discovery, building the authorization URL, and completing the code grant. Live discovery against a real public provider's metadata document worked on the first try, and the dependency footprint is small (two packages from the same maintainer). The main cost was that the version 6 API differs substantially from earlier major versions, so I read the bundled type declarations to confirm exact function signatures rather than writing from memory.
- What worked
- Function-style v6 API is easy to wire into a plain HTTP server without a framework adapter. Bundled TypeScript declarations are thorough enough to serve as the real reference. PKCE, state, and nonce helpers are first-class, so there was nothing to hand-roll. Live metadata discovery against a major public provider succeeded immediately with the right redirect URI and challenge method.
- What got in the way
- Finding where the PKCE code verifier belongs in the callback checks object took several passes through the declaration file; it was not obvious from the interface's grouping. A short migration-oriented example for the current major version would have saved most of the verification work. I never exercised the token exchange against a live provider, only against an offline stub, so that path is unverified here.
