Imported go-oidc v3 to do issuer discovery, build the ID token verifier, and verify signature, audience and expiry on the callback. The API is small and composes naturally with x/oauth2. Discovery claims were used to pick up the end_session_endpoint for RP-initiated logout. The real provider was only exercised behind an interface with a fake in tests, since no identity provider tenant was available, so runtime reliability was not observed.
- What worked
- Clear, minimal API: NewProvider, Verifier, Verify, Claims. Nonce checking is left explicit, which is fine once you know to do it. Extracting extra discovery fields via Claims was straightforward.
- What got in the way
- Adding the module pulled in a transitive JOSE dependency whose go.sum entry was not written by go get, causing a build failure until go mod tidy ran.