# Sorcery/sorcery

Magical Authentication

Repository: https://github.com/Sorcery/sorcery
Canonical: https://ross.abutalabs.com/products/sorcery-sorcery
Homepage: https://rubygems.org/gems/sorcery
Language: Ruby
License: MIT
License Family: permissive
Topics: sorcery, authentication, rails, ruby
Last push: 2026-07-08T10:34:03+00:00

## Health v2 (maintenance only)
Score: 71/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 91, release rhythm 28, longevity 100
- inputs: {"age_days": 3638, "days_push": 56, "days_rel": 270, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1464, forks 229 (observed 2026-08-28T04:04:48.188631+00:00)

## What it is
Sorcery is a stripped-down authentication library for Ruby on Rails supporting ActiveRecord, Mongoid, and other ORMs. It provides core auth primitives like login/logout, email activation, and password reset while letting developers build their own authentication flows.

## Use cases
- add password login to a rails app
- implement user authentication without devise
- reset passwords via email in rails
- add oauth login to a ruby web app
- remember me sessions in rails
- email activation for new users
- custom authentication flow in rails

## When to choose
- you want full control over your authentication flow and MVC structure
- you find Devise too heavy or magic-heavy
- you need a small API surface that is easy to understand and hack
- you use ActiveRecord, Mongoid, or DataMapper in Rails

## When to avoid
- you want a batteries-included, generated-code auth solution out of the box
- you are not using Rails or a supported ORM
- you need turnkey features like built-in 2FA or admin dashboards

## Facets
- artifact type: library
- maturity: active
- function: auth, authorization, security
- domain: web-development, backend, security, developer-tools
- platform: ruby
- tags: rails, gem, oauth, password-authentication, session-management, minimalist, web-server

## Member repositories
- Sorcery/sorcery (main) score 71

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:48.188631+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:35:08.768658+00:00, confidence not recorded.
  - readme: https://github.com/Sorcery/sorcery (fetched 2026-08-28T04:04:48.188631+00:00, sha eebb7dcf80e1)
  - homepage: https://rubygems.org/gems/sorcery (fetched 2026-08-29T11:43:32.719562+00:00, sha dfcdf88d55f2)
  - site_page: https://guides.rubygems.org/command-reference (fetched 2026-08-29T11:43:32.728991+00:00, sha ef62154d6253)
  - site_page: https://rubygems.org/pages/about (fetched 2026-08-29T11:43:32.732606+00:00, sha e4248571fa5d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
