# dghubble/gologin

Go login handlers for authentication providers (OAuth1, OAuth2)

Repository: https://github.com/dghubble/gologin
Canonical: https://ross.abutalabs.com/products/gologin
Language: Go
License: MIT
License Family: permissive
Last push: 2026-08-19T13:42:55+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 8, longevity 100
- inputs: {"age_days": 4089, "days_push": 14, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1959, forks 147 (observed 2026-08-28T04:05:59.299477+00:00)

## What it is
gologin is a Go library providing chainable http.Handler implementations for login flows with OAuth1 and OAuth2 providers like Google, GitHub, Twitter, and Facebook. It supports web login flows via LoginHandler/CallbackHandler and mobile token flows via TokenHandler, passing authenticated users or tokens through the request context.

## Use cases
- add google sign-in to a go web app
- implement github oauth login in go
- handle twitter oauth1 login flow
- support facebook login on a website
- add oauth2 login with csrf state protection
- handle native mobile app token logins in go
- chain custom success and failure handlers after social login

## When to choose
- you need social/OAuth login in a Go web server with composable http.Handler middleware
- you want support for both OAuth1 and OAuth2 providers in one library
- you need configurable CSRF state handling for OAuth2 flows
- you want lightweight handlers that integrate with net/http rather than a full auth framework

## When to avoid
- you need full user management with sessions, passwords, and registration (use an auth framework like authboss or Ory)
- your app is not written in Go
- you need OpenID Connect-specific features beyond plain OAuth2
- you want a hosted or turnkey authentication service

## Facets
- artifact type: library
- maturity: stable
- function: auth, http-server, middleware
- domain: web-development, backend, security, apis
- platform: go
- tags: oauth1, oauth2, social-login, http-handlers, authentication-providers, web-server

## Member repositories
- dghubble/gologin (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:59.299477+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-30T03:05:58.434204+00:00, confidence not recorded.
  - readme: https://github.com/dghubble/gologin (fetched 2026-08-28T04:05:59.299477+00:00, sha 9d17c56c38cb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
