Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. OpenID Connect
  3. go-oidc

go-oidc

Apache-2.0Gov3.21.0

A Go package that adds OpenID Connect client support to the standard OAuth2 library.

GitHubGitHub
2.5k stars436 forks0 contributors

What is go-oidc?

go-oidc is a Go library that implements the OpenID Connect client protocol, enabling Go applications to authenticate users via identity providers like Google or Auth0. It extends the standard `golang.org/x/oauth2` package to handle OIDC-specific features such as ID token verification and provider discovery.

Target Audience

Go developers building web applications or services that require secure user authentication via third-party identity providers.

Value Proposition

It provides a lightweight, standards-compliant way to add OIDC support to Go applications without implementing the protocol from scratch, leveraging the familiar OAuth2 package ecosystem.

Overview

A Go OpenID Connect client.

Use Cases

Best For

  • Adding Google Sign-In to a Go web application
  • Implementing authentication with Auth0 or Okta in Go services
  • Verifying ID tokens from OIDC providers in API backends
  • Building microservices that require centralized identity management
  • Extending existing OAuth2 flows with OpenID Connect claims
  • Developing internal tools that need enterprise SSO integration

Not Ideal For

  • Projects requiring a full-stack authentication solution with built-in user interfaces and session management
  • Applications needing complex multi-factor authentication or authorization logic beyond standard OIDC
  • Teams that prefer minimal external dependencies and avoid libraries built on other packages
  • Scenarios where server-side OIDC provider implementation is needed, as this library is client-only

Pros & Cons

Pros

Seamless OAuth2 Integration

Built as an extension to the standard `golang.org/x/oauth2` package, allowing developers to leverage familiar OAuth2 flows with minimal code changes, as shown in the README's configuration example.

Automated Provider Discovery

Automatically fetches OIDC provider endpoints from an issuer URL, simplifying setup by eliminating manual configuration, demonstrated in the `oidc.NewProvider` call.

Robust ID Token Verification

Verifies ID tokens with signature validation using JWKS, ensuring secure authentication without implementing crypto logic, as seen in the `verifier.Verify` method.

Easy Claims Extraction

Allows straightforward extraction of user claims from verified tokens, enabling quick access to data like email, illustrated by the `idToken.Claims` function in the README.

Cons

Breaking API Changes

The v3 update introduced breaking changes, such as altered import paths and return types (e.g., `NewRemoteKeySet`), which can cause migration headaches, as admitted in the README.

Minimalist Feature Set

Focuses solely on OIDC client basics; lacks built-in support for advanced features like automatic token refresh or comprehensive error handling, requiring manual implementation.

Dependency on External Services

Relies on OIDC providers being available for discovery and verification, introducing points of failure in distributed systems if providers are down or unreachable.

Frequently Asked Questions

Quick Stats

Stars2,475
Forks436
Contributors0
Open Issues16
Last commit1 day ago
CreatedSince 2015

Tags

#oauth2#authentication#openid-connect#jwt#security#api-client#golang#go#identity-provider

Built With

G
Go

Included in

OpenID Connect99
Auto-fetched 10 hours ago

Related Projects

oidcoidc

Easy to use OpenID Connect client and server library written for Go and certified by the OpenID Foundation

Stars1,886
Forks221
Last commit4 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub