Self-hosted core service for SuperTokens, an open-source authentication and session management backend that is an alternative to Auth0, Firebase Auth and AWS Cognito.
heartcombo/devise
Flexible authentication solution for Rails built on Warden, offering modular features like database login, confirmation, password recovery and account lockout.
- Stars
- 24,349
- Forks
- 5,470
- Open issues
- 243
- Last commit
- last month
What is it?
Devise is an authentication library for Ruby on Rails. It is built on Warden, a Rack-based authentication framework, and ships as a Rails engine that provides the controllers, views and routes needed for a complete sign-in system.
Functionality is split into modules that you enable per model, so you only include what you need. Available modules cover database-backed password login, OmniAuth social login, email confirmation, password recovery, user registration, remember-me cookies, activity tracking, session timeouts, validations, and locking accounts after repeated failed sign-ins. Multiple models, such as User and Admin, can be signed in at the same time.
Devise supports ActiveRecord by default and Mongoid as an alternative ORM. Its generators install a configuration initializer and create the model and routes, and helpers like authenticate_user! and current_user are available in controllers and views.
Key features
- 01Modular authentication features you enable per model.
- 02Database-backed password login with HTTP Basic Authentication support.
- 03OmniAuth integration for third-party sign-in providers.
- 04Email confirmation, password recovery and account unlock flows.
- 05Multiple user models signed in at the same time.
- 06Customizable controllers, views and strong parameter sanitization.
Use cases
- Adding sign-up and sign-in to a new or existing Rails application.
- Separating admin and end-user logins with different models.
- Adding social login alongside email and password accounts.
- Protecting API endpoints with HTTP Basic authentication in Rails API mode.
Quick start
- 1
Add Devise to your Rails Gemfile
bundle add devise - 2
Run the Devise install generator
rails generate devise:install - 3
Generate a user model with Devise modules
rails generate devise MODEL - 4
Run the database migrations
rails db:migrate
Things to know
- Requires a solid understanding of Rails; the README advises beginners to learn authentication from scratch first.
- Targets Rails 7 onwards for version 5, so older Rails apps need an older Devise release.
In collections
Topics
FAQ
- What is devise?
- Flexible authentication solution for Rails built on Warden, offering modular features like database login, confirmation, password recovery and account lockout. Devise is an authentication library for Ruby on Rails. It is built on Warden, a Rack-based authentication framework, and ships as a Rails engine that provides the controllers, views and routes needed for a complete sign-in system.
- Is devise free to use? What license does it have?
- devise is open source under the MIT license. Check the license terms before using it in commercial products.
- Is devise still maintained?
- Updated within 6 months. The last commit to devise was on Oct 6, 2026.
- What can I use devise for?
- Adding sign-up and sign-in to a new or existing Rails application. Separating admin and end-user logins with different models. Adding social login alongside email and password accounts. Protecting API endpoints with HTTP Basic authentication in Rails API mode.
- How do I install devise?
- Add Devise to your Rails Gemfile: bundle add devise Run the Devise install generator: rails generate devise:install Generate a user model with Devise modules: rails generate devise MODEL Run the database migrations: rails db:migrate
- Where can I get devise?
- The source code and installation instructions are on GitHub: https://github.com/heartcombo/devise
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Ruby authentication library that standardizes multi-provider sign-in for web apps through pluggable Rack middleware strategies.
A framework-agnostic authentication and authorization framework for TypeScript, with a plugin system for features like 2FA and multi-tenancy.
Self-hosted identity and access management server providing SSO, OAuth/OIDC, SAML, CAS, LDAP, SCIM, MFA and an MCP gateway, with a web console.
Open source authentication and user management backend with passkeys, passwords, MFA, OAuth and SAML SSO, plus web components.
A Go-based authentication and user management server that issues JWTs, powering Supabase Auth.