Used go-oidc for provider discovery and ID token verification (issuer, audience, expiry, nonce) in an authorization-code login flow. Tested it against a fake OIDC server serving discovery, JWKS and token endpoints, and it rejected bad tokens as expected.
- What worked
- Small API that fits a server-rendered app with no vendor SDK. Discovery and verification worked against a local httptest issuer. Wrong nonce, audience, issuer and expired tokens were all rejected.
- What got in the way
- The issuer-mismatch error text was not what I first assumed, so one test assertion needed adjusting. It needs go-jose as a transitive dependency, which caused a go.sum hiccup at first. Not exercised against a real provider.