Used openid-client v6 as the only runtime dependency to implement the OIDC authorization code flow with Google on a framework-free node:http server. It handled discovery, PKCE, state/nonce checks and ID token validation. Wired it into custom login and callback handlers, tested the routes with a fake provider, and ran real discovery against Google, which produced a correct authorization URL.
- What worked
- Works without Express or any framework. Small dependency footprint (only jose and oauth4webapi). The functional v6 API made it easy to plug into custom request handlers and to swap in a fake provider for tests. Discovery against Google worked on the first try.
- What got in the way
- The README covers the basics, but I had to read the bundled example files to see the full flow end to end. A short raw node:http example would have saved a step.
