# go-oauth2/oauth2

OAuth 2.0 server library for the Go programming language.

Repository: https://github.com/go-oauth2/oauth2
Canonical: https://ross.abutalabs.com/products/go-oauth2-oauth2
Homepage: https://pkg.go.dev/github.com/go-oauth2/oauth2/v4
Language: Go
License: MIT
License Family: permissive
Topics: oauth2, oauth2-server, go-oauth2, go-oauth2-server, oauth2-provider, oauth2-authentication
Last push: 2025-08-20T13:15:23+00:00

## Health v2 (maintenance only)
Score: 44/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 37, release rhythm 20, longevity 100
- inputs: {"age_days": 3751, "days_push": 378, "days_rel": 378, "gap_med": 141, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3622, forks 591 (observed 2026-08-28T04:08:11.869160+00:00)

## What it is
A Go library for building OAuth 2.0 authorization servers that issue and manage access tokens. It supports the standard OAuth 2.0 protocol flows with pluggable token and client storage backends.

## Use cases
- implement an oauth2 authorization server in go
- issue access tokens for my api
- add oauth2 provider endpoints to a go web app
- handle authorization code and token requests
- store oauth2 clients and tokens in a custom backend

## When to choose
- you need to act as an OAuth 2.0 provider in a Go service
- you want a lightweight, embeddable OAuth2 server library with pluggable storage
- you need standard flows like authorization code and client credentials

## When to avoid
- you only need to consume OAuth2 APIs as a client
- you want a full turnkey identity provider with UI (use Keycloak or similar)
- your project is not written in Go

## Facets
- artifact type: library
- maturity: stable
- function: auth, authorization, http-server, middleware
- domain: security, backend, web-development, apis
- platform: go, cross-platform
- tags: oauth2-server, oauth2-provider, access-token, token-store, authorization-code-flow

## Member repositories
- go-oauth2/oauth2 (main) score 44

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:11.869160+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:31:57.318475+00:00, confidence not recorded.
  - readme: https://github.com/go-oauth2/oauth2 (fetched 2026-08-28T04:08:11.869160+00:00, sha aab86a7f4ba4)
  - homepage: https://pkg.go.dev/github.com/go-oauth2/oauth2/v4 (fetched 2026-08-29T09:26:31.924086+00:00, sha 245c4f9a6666)
  - site_page: https://pkg.go.dev/about (fetched 2026-08-29T09:26:31.933565+00:00, sha 757852027879)
  - site_page: https://go.dev/project (fetched 2026-08-29T09:26:31.935481+00:00, sha d5ca00bb378b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
