# go-pkgz/auth

Authenticator via oauth2, direct, email and telegram

Repository: https://github.com/go-pkgz/auth
Canonical: https://ross.abutalabs.com/products/go-pkgz-auth
Homepage: https://go-pkgz.umputun.dev/auth/
Language: Go
License: MIT
License Family: permissive
Topics: golang, go, library, authentication, oauth2, oauth2-client, login, custom-oauth2, middleware, jwt
Last push: 2026-08-26T18:18:59+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 98, longevity 100
- inputs: {"age_days": 2807, "days_push": 7, "days_rel": 14, "gap_med": 6.0, "n_releases_24m": 21}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1349, forks 97 (observed 2026-08-28T04:04:27.829743+00:00)

## What it is
A Go library providing authentication via multiple oauth2 providers (GitHub, Google, Facebook, Discord, Telegram, and more), direct credentials, and email verification. It issues JWTs stored in secure cookies with XSRF protection and includes router middleware, avatar proxying, and role-based access control.

## Use cases
- add social login to a Go web app
- authenticate users with JWT cookies in Go
- support multiple oauth2 providers at once
- implement email verification login flow
- add telegram login to a backend service
- protect HTTP routes with auth middleware
- add role-based access control to a Go API

## When to choose
- building a Go HTTP service that needs social login or JWT-based auth
- you want multiple oauth2 providers with minimal boilerplate
- you need built-in avatar handling, blacklists, and auth hooks

## When to avoid
- your project is not written in Go
- you need a full identity provider with user management UI
- you prefer framework-bundled auth like Django or Rails built-ins

## Facets
- artifact type: library
- maturity: active
- function: auth, middleware, http-server
- domain: security, web-development, backend, developer-tools
- platform: go, windows
- tags: oauth2, jwt, social-login, authentication, email-verification, telegram-login, xsrf-protection, avatar-proxy, role-based-access-control, linux, macos

## Member repositories
- go-pkgz/auth (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:27.829743+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-30T04:42:21.635415+00:00, confidence not recorded.
  - readme: https://github.com/go-pkgz/auth (fetched 2026-08-28T04:04:27.829743+00:00, sha b8b47459938e)
  - homepage: https://go-pkgz.umputun.dev/auth/ (fetched 2026-08-29T12:01:18.129977+00:00, sha 62488c65c2dc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
