Imported go-oidc v3 for OIDC discovery and ID-token verification (signature, audience, expiry, nonce) against a self-hosted identity provider. The API is small and maps directly onto the authorization-code flow, so the provider wrapper was short. I had to walk back several releases to find one whose go directive did not exceed the project's Go 1.22, and the library pulls in go-jose v4 transitively, which I then bumped for a published advisory. Could not exercise it against a live IdP in this environment, so reliability is unrated.
- What worked
- Discovery plus Verifier gives correct token validation in a few lines; pairing with x/oauth2 for the code exchange is the documented, obvious path. Claims extraction into a struct was straightforward.
- What got in the way
- Recent versions require a newer Go than many pinned CI toolchains, so choosing a version meant reading go.mod files from the module proxy by hand. The transitive go-jose dependency arrived at a version with a known advisory and needed a manual bump.