Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

go-oidc

> 编程语言
Open source

A Go OpenID Connect client.

2.5K stars0 likes1 views
WebsiteGitHub

About

A Go OpenID Connect client.

go-oidc

OpenID Connect is a specification on top of OAuth 2.0 that adds a provider-agnostic API for user attributes. End users perform the regular OAuth 2.0 flow and the response includes a JWT signed by the identity provider with standard claims for a stable identifier, email, display name, and other attributes.

json
{
  "sub": "12345abcd",
  "email": "[email protected]",
  "email_verified": true,
  "name": "Jane Doe"
}

This package can be used to identify users (and even workload identities) across a large number of identity providers:

  • Consumer
    • Google
    • Apple (Sign in with Apple)
    • Microsoft
    • Facebook Login
    • LinkedIn
  • Enterprise
    • Microsoft Entra ID
    • Okta
    • Auth0
    • Amazon Cognito
    • OneLogin
  • Workload
    • GitHub Actions
    • GitLab CI/CD (ID tokens)
    • Google Cloud Workload Identity Federation
    • AWS (IAM OIDC identity providers)
    • Kubernetes (service account / OIDC tokens)
    • HashiCorp HCP Terraform

go-oidc is a mature OpenID Connect client, and is imported by over 1000 open source projects.

OpenID Connect support for Go

This package enables OpenID Connect support for the golang.org/x/oauth2 package. The client can be initialized through OpenID Connect discovery with the issuer URL and a few additional scopes on the oauth2.Config.

…

OAuth2 redirects are unchanged.

go
func handleRedirect(w http.ResponseWriter, r *http.Request) {
    http.Redirect(w, r, oauth2Config.AuthCodeURL(state), http.StatusFound)
}

Then, on the response, the ID Token verifier can be used to verify ID Tokens.

…

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gogolang

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言