# devise token auth

Token based authentication for Rails JSON APIs. Designed to work with jToker and ng-token-auth.

Repository: https://github.com/lynndylanhurley/devise_token_auth
Canonical: https://ross.abutalabs.com/products/devise-token-auth
Language: Ruby
License: WTFPL
License Family: permissive
Topics: devise, rails, authentication, api, oauth, omniauth
Last push: 2026-07-31T13:14:56+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 35, longevity 100
- inputs: {"age_days": 4448, "days_push": 33, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3571, forks 1132 (observed 2026-08-28T04:08:10.720733+00:00)

## What it is
A Ruby gem providing token-based authentication for Rails JSON APIs, built on Devise and OmniAuth. It supports multi-client sessions, token refresh, OAuth2, email auth, and integrates with frontend clients like ng-token-auth, jToker, and redux-auth.

## Use cases
- add token authentication to a Rails JSON API
- authenticate a SPA or mobile app against a Rails backend
- support OAuth2 login with OmniAuth in a Rails API
- manage multiple simultaneous device sessions per user
- implement email registration, login, and password reset for an API
- connect a React or Angular frontend to Rails token auth

## When to choose
- you're building a Rails JSON API serving SPA or mobile clients
- you need multi-device token sessions with refresh and expiry
- you want Devise-style email auth plus OAuth2 in an API
- you're using a compatible frontend client like ng-token-auth or jToker

## When to avoid
- you're building a traditional server-rendered Rails app with cookie sessions
- you're not using Rails or Ruby
- you prefer JWT-based auth or a newer API auth solution
- you need a framework-agnostic authentication system

## Facets
- artifact type: library
- maturity: active
- function: auth, middleware, api-framework
- domain: web-development, backend, security, apis
- platform: ruby
- tags: rails, devise, token-authentication, spa, omniauth, oauth2, json-api, mobile-backend, web-server

## Member repositories
- lynndylanhurley/devise_token_auth (main) score 75
- lynndylanhurley/redux-auth (sdk) score 32
- lynndylanhurley/ng-token-auth (sdk) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:10.720733+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:34:05.925813+00:00, confidence not recorded.
  - readme: https://github.com/lynndylanhurley/devise_token_auth (fetched 2026-08-28T04:08:10.720733+00:00, sha c218a06bf998)
  - registry_npm: https://registry.npmjs.org/redux-auth (fetched 2026-08-29T09:28:18.480625+00:00, sha 564060372b50)
- Data as of 2026-08-30T08:39:29.467469+00:00.
