{"id":37134228,"url":"https://github.com/bogbert/go-oidc","last_synced_at":"2026-01-14T15:39:33.436Z","repository":{"id":57569156,"uuid":"344091358","full_name":"bogbert/go-oidc","owner":"bogbert","description":"A Go OpenID Connect client.","archived":false,"fork":true,"pushed_at":"2021-03-03T10:52:44.000Z","size":323,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"v3","last_synced_at":"2024-06-20T05:25:42.369Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"coreos/go-oidc","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bogbert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-03T10:42:47.000Z","updated_at":"2024-06-20T05:25:42.370Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bogbert/go-oidc","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/bogbert/go-oidc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogbert%2Fgo-oidc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogbert%2Fgo-oidc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogbert%2Fgo-oidc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogbert%2Fgo-oidc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bogbert","download_url":"https://codeload.github.com/bogbert/go-oidc/tar.gz/refs/heads/v3","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogbert%2Fgo-oidc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28424374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T15:39:32.815Z","updated_at":"2026-01-14T15:39:33.423Z","avatar_url":"https://github.com/bogbert.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-oidc\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/coreos/go-oidc/v3/oidc.svg)](https://pkg.go.dev/github.com/coreos/go-oidc/v3/oidc)\n![github.com/coreos/go-oidc/v3](https://github.com/coreos/go-oidc/workflows/test/badge.svg?branch=v3)\n\n## Updates from v2 to v3\n\nThere were two breaking changes made to the v3 branch. The import path has changed from:\n\n```\ngithub.com/coreos/go-oidc\n```\n\nto:\n\n```\ngithub.com/coreos/go-oidc/v3/oidc\n```\n\nAnd the return type of `NewRemoteKeySet()` is now `*RemoteKeySet` instead of an interface ([#262](https://github.com/coreos/go-oidc/pull/262)).\n\n## OpenID Connect support for Go\n\nThis package enables OpenID Connect support for the [golang.org/x/oauth2](https://godoc.org/golang.org/x/oauth2) package.\n\n```go\nprovider, err := oidc.NewProvider(ctx, \"https://accounts.google.com\")\nif err != nil {\n    // handle error\n}\n\n// Configure an OpenID Connect aware OAuth2 client.\noauth2Config := oauth2.Config{\n    ClientID:     clientID,\n    ClientSecret: clientSecret,\n    RedirectURL:  redirectURL,\n\n    // Discovery returns the OAuth2 endpoints.\n    Endpoint: provider.Endpoint(),\n\n    // \"openid\" is a required scope for OpenID Connect flows.\n    Scopes: []string{oidc.ScopeOpenID, \"profile\", \"email\"},\n}\n```\n\nOAuth2 redirects are unchanged.\n\n```go\nfunc handleRedirect(w http.ResponseWriter, r *http.Request) {\n    http.Redirect(w, r, oauth2Config.AuthCodeURL(state), http.StatusFound)\n}\n```\n\nThe on responses, the provider can be used to verify ID Tokens.\n\n```go\nvar verifier = provider.Verifier(\u0026oidc.Config{ClientID: clientID})\n\nfunc handleOAuth2Callback(w http.ResponseWriter, r *http.Request) {\n    // Verify state and errors.\n\n    oauth2Token, err := oauth2Config.Exchange(ctx, r.URL.Query().Get(\"code\"))\n    if err != nil {\n        // handle error\n    }\n\n    // Extract the ID Token from OAuth2 token.\n    rawIDToken, ok := oauth2Token.Extra(\"id_token\").(string)\n    if !ok {\n        // handle missing token\n    }\n\n    // Parse and verify ID Token payload.\n    idToken, err := verifier.Verify(ctx, rawIDToken)\n    if err != nil {\n        // handle error\n    }\n\n    // Extract custom claims\n    var claims struct {\n        Email    string `json:\"email\"`\n        Verified bool   `json:\"email_verified\"`\n    }\n    if err := idToken.Claims(\u0026claims); err != nil {\n        // handle error\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbogbert%2Fgo-oidc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbogbert%2Fgo-oidc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbogbert%2Fgo-oidc/lists"}