Skip to content
phillyslick edited this page Mar 9, 2014 · 4 revisions

Feel free to add your own how-to and categorize it in this list.

  1. Workflow Customization
  • [Automatically generate password for users (simpler registration)](https://github.com/plataformatec/devise/wiki/How-To:-Automatically-generate-password-for-users-%28simpler-registration%29)
  • [Change the default sign_in and sign_out routes](https://github.com/plataformatec/devise/wiki/How-To:-Change-the-default-sign_in-and-sign_out-routes)
  • [Customize routes to user registration pages](https://github.com/plataformatec/devise/wiki/How-To:-Customize-routes-to-user-registration-pages)
  • [Redirect to a specific page on successful sign in out](https://github.com/plataformatec/devise/wiki/How-To:-Redirect-to-a-specific-page-on-successful-sign-in-out)
  • [Customize the redirect after a user edits their profile](https://github.com/plataformatec/devise/wiki/How-To:-Customize-the-redirect-after-a-user-edits-their-profile)
  • [Customize the redirect path after destroying a session (signing out)](https://github.com/plataformatec/devise/wiki/How-To:-Change-the-redirect-path-after-destroying-a-session-i.e.-signing-out)
  • [Override confirmations so users can pick their own passwords as part of confirmation activation](https://github.com/plataformatec/devise/wiki/How-To:-Override-confirmations-so-users-can-pick-their-own-passwords-as-part-of-confirmation-activation)
  • [Redirect with locale after authentication failure](https://github.com/plataformatec/devise/wiki/How-To:—Redirect-with-locale-after-authentication-failure)
  • [Require admin to activate account before sign_in](https://github.com/plataformatec/devise/wiki/How-To:-Require-admin-to-activate-account-before-sign_in)
  • [Set up devise as a single user system](https://github.com/plataformatec/devise/wiki/How-To:-Set-up-devise-as-a-single-user-system)
  • [Two step confirmation](https://github.com/plataformatec/devise/wiki/How-To:-Two-step-confirmation)
  • [Redirect back to current page after sign in, sign out, sign up, update](https://github.com/plataformatec/devise/wiki/How-To:-Redirect-back-to-current-page-after-sign-in,-sign-out,-sign-up,-update)
  • [Redirect from HTTPS to HTTP on successful sign out](https://github.com/plataformatec/devise/wiki/How-To:-redirect-from-HTTPS-to-HTTP-on-successful-sign-out)
  • [Redirect to a specific page after a successful sign in or sign out](https://github.com/plataformatec/devise/wiki/How-To:-Redirect-to-a-specific-page-after-a-successful-sign-in-or-sign-out)
  • [Redirect to a specific page on successful sign in](https://github.com/plataformatec/devise/wiki/How-To:-redirect-to-a-specific-page-on-successful-sign-in)
  • [Redirect to a specific page on successful sign in and sign out](https://github.com/plataformatec/devise/wiki/How-To:-Redirect-to-a-specific-page-on-successful-sign-in-and-sign-out)
  • [Redirect to a specific page on successful sign in or sign out](https://github.com/plataformatec/devise/wiki/How-To:-Redirect-to-a-specific-page-on-successful-sign-in-or-sign-out)
  • [Redirect to a specific page on successful sign in out](https://github.com/plataformatec/devise/wiki/How-to:-redirect-to-a-specific-page-on-successful-sign-in-out)
  • [Redirect to a specific page on successful sign up (registration)](https://github.com/plataformatec/devise/wiki/How-To:-Redirect-to-a-specific-page-on-successful-sign-up-%28registration%29)
  • [Redirect to a specific page when the user can not be authenticated](https://github.com/plataformatec/devise/wiki/How-To:-Redirect-to-a-specific-page-when-the-user-can-not-be-authenticated)
  • [Do not redirect to login page after session timeout](https://github.com/plataformatec/devise/wiki/How-To:-Do-not-redirect-to-login-page-after-session-timeout)
  • [Create a guest user](https://github.com/plataformatec/devise/wiki/How-To:-Create-a-guest-user)
  • [Allow users to edit their password](https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-edit-their-password)
  • [Require authentication for all pages and avoid “You need to sign in…” message when hitting the application root](https://github.com/plataformatec/devise/wiki/How-To:-Require-authentication-for-all-pages)
  • [Use a custom email validator with Devise](https://github.com/plataformatec/devise/wiki/How-to:-Use-a-custom-email-validator-with-Devise)
  1. View/Content Customization
  • [Create custom layouts](https://github.com/plataformatec/devise/wiki/How-To:-Create-custom-layouts)
  • [Custom mailer](https://github.com/plataformatec/devise/wiki/How-To:-Use-custom-mailer)
  • [I18n](https://github.com/plataformatec/devise/wiki/I18n)
  • [Set :host and :port for all devise mailer urls](https://github.com/plataformatec/devise/wiki/How-To:-Set-:host-and-:port-for-all-devise-mailer-urls)
  • [Override devise_error_messages! for use in views](https://github.com/plataformatec/devise/wiki/Override-devise_error_messages!-for-views)
  • [Integrate I18n Flash Messages with Devise and Bootstrap](https://github.com/plataformatec/devise/wiki/How-To:-Integrate-I18n-Flash-Messages-with-Devise-and-Bootstrap)
  1. Custom Authentication Methods
  • [Allow users to sign in with something other than their email address](https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign-in-with-something-other-than-their-email-address)
  • [Authenticate via LDAP](https://github.com/plataformatec/devise/wiki/How-To:-Authenticate-via-LDAP)
  • [Create a guest user](https://github.com/plataformatec/devise/wiki/How-To:-Create-a-guest-user)
  • [Email-only sign-up](https://github.com/plataformatec/devise/wiki/How To: Email-only sign-up)
  • [Edit an account without providing a password](https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-edit-their-account-without-providing-a-password)
  • [HTTP Authentication](https://github.com/plataformatec/devise/wiki/How-To:-Use-HTTP-Basic-Authentication)
  • [HTTP Auth Basic](https://github.com/plataformatec/devise/wiki/How-To:-Use-HTTP-Auth-Basic-with-Devise)
  • [Isolate users to log into a single subdomain](https://github.com/plataformatec/devise/wiki/How-To:—Isolate-users-to-log-into-a-single-subdomain)
  • [Recaptcha](https://github.com/plataformatec/devise/wiki/How-To:-Use-Recaptcha-with-Devise)
  • [Remote authentication with Devise](https://github.com/plataformatec/devise/wiki/How-to:-Remote-authentication-with-Devise)
  • [Set up devise as a single user system](https://github.com/plataformatec/devise/wiki/How-To:-Set-up-devise-as-a-single-user-system)
  • [Sign in using either a username or email address](https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign-in-using-their-username-or-email-address)
  • [Simple Token Authentication Example](https://github.com/plataformatec/devise/wiki/How-To:-Simple-Token-Authentication-Example)
  • [Use case insensitive emails](https://github.com/plataformatec/devise/wiki/How-To:-Use-case-insensitive-emails)
  • [Use SSL (HTTPS)](https://github.com/plataformatec/devise/wiki/How-To:-Use-SSL-%28HTTPS%29)
  • [Use subdomains](https://github.com/plataformatec/devise/wiki/How-To:-Use-subdomains)
  1. OmniAuth
  • [OmniAuth: Overview](https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview)
  • [OmniAuth: Testing](https://github.com/plataformatec/devise/wiki/OmniAuth:—Testing)
  • [Omniauthable, sign out action and rememberable](https://github.com/plataformatec/devise/wiki/Omniauthable,-sign-out-action-and-rememberable)
  1. Testing
  • [Capybara](https://github.com/plataformatec/devise/wiki/How-To:-Test-with-Capybara)
  • [Controllers tests with Rails 3 (and rspec)](https://github.com/plataformatec/devise/wiki/How-To:-Controllers-tests-with-Rails-3-(and-rspec))
  • [Cucumber](https://github.com/plataformatec/devise/wiki/How-To:-Test-with-Cucumber)
  • [OmniAuth: Testing](https://github.com/plataformatec/devise/wiki/OmniAuth:—Testing)
  • [Rspec with devise and machinist](https://github.com/plataformatec/devise/wiki/How-To:-Rspec-with-devise-and-machinist)
  • [Speed up your unit tests](https://github.com/plataformatec/devise/wiki/Speed-up-your-unit-tests)
  • [Stub authentication in controller specs](https://github.com/plataformatec/devise/wiki/How-To:-Stub-authentication-in-controller-specs)
  1. Privileges/Authorization
  • [Add an Admin role](https://github.com/plataformatec/devise/wiki/How-To:-Add-an-Admin-role)
  • [Add a default role to a User](https://github.com/plataformatec/devise/wiki/How-To:-Add-a-default-role-to-a-User)
  • [Create a guest user](https://github.com/plataformatec/devise/wiki/How-To:-Create-a-guest-user)
  • [Integrate with CanCan for roles management](https://github.com/plataformatec/devise/wiki/How-To:-Integrate-with-CanCan-for-roles-management)
  • [Manage Users with an Admin Role (CanCan method)](https://github.com/plataformatec/devise/wiki/How-To:-Manage-Users-with-an-Admin-Role-(CanCan-method))
  • [Require admin to activate account before sign_in](https://github.com/plataformatec/devise/wiki/How-To:-Require-admin-to-activate-account-before-sign_in)
  • [Sign in as another user if you are an admin](https://github.com/plataformatec/devise/wiki/How-To:-Sign-in-as-another-user-if-you-are-an-admin)
  • [Turn off trackable for admin users](https://github.com/plataformatec/devise/wiki/How-To:-Turn-off-trackable-for-admin-users)
  1. Special Configurations
  • [Add :confirmable to Users](https://github.com/plataformatec/devise/wiki/How-To:-Add-:confirmable-to-Users)
  • [Create a custom encryptor](https://github.com/plataformatec/devise/wiki/How-To:-Create-a-custom-encryptor)
  • [Create Haml and Slim Views](https://github.com/plataformatec/devise/wiki/How-To:-Create-Haml-and-Slim-Views)
  • [Configure a master password](https://github.com/plataformatec/devise/wiki/How-To:-Configure-a-master-password)
  • [Customize user account status validation when logging in](https://github.com/plataformatec/devise/wiki/How-To:-Customize-user-account-status-validation-when-logging-in)
  • [Disable user from destroying his account](https://github.com/plataformatec/devise/wiki/How-To:-Disable-user-from-destroying-his-account)
  • [Disallow previously used passwords](https://github.com/plataformatec/devise/wiki/How-To:-Disallow-previously-used-passwords)
  • [Dynamic user registration timeout](https://github.com/plataformatec/devise/wiki/How-To:-Add-timeout_in-value-dynamically)
  • [Embed users in your account model with Mongoid](https://github.com/plataformatec/devise/wiki/How-To:-Embed-users-in-your-account-model-with-Mongoid)
  • [Protect Resque Web with Devise](https://github.com/plataformatec/devise/wiki/How-To:-Protect-Resque-Web-with-Devise)
  • [Send emails from subdomains](https://github.com/plataformatec/devise/wiki/How-To:-Send-emails-from-subdomains)
  • [Send emails in background (Resque, Sidekiq and Delayed::Job)](https://github.com/plataformatec/devise/wiki/How-To%3A-Send-devise-emails-in-background-%28Resque%2C-Sidekiq-and-Delayed%3A%3AJob%29)
  • [Using paranoid mode, avoid user enumeration on registerable](https://github.com/plataformatec/devise/wiki/How-To:-Using-paranoid-mode,-avoid-user-enumeration-on-registerable)
  • [Use Devise Inside a Mountable Engine](https://github.com/plataformatec/devise/wiki/How-To:-Use-devise-inside-a-mountable-engine)
  1. Elsewhere in your App
  • [Add sign_in, sign_out, and sign_up links to your layout template](https://github.com/plataformatec/devise/wiki/How-To:-Add-sign_in,-sign_out,-and-sign_up-links-to-your-layout-template)
  • [Display a custom sign_in form anywhere in your app](https://github.com/plataformatec/devise/wiki/How-To:-Display-a-custom-sign_in-form-anywhere-in-your-app)
  • [Sign in from a controller](https://github.com/plataformatec/devise/wiki/How-To:-Sign-in-from-a-controller)
  • [Use Devise generated method and filters for controllers](https://github.com/plataformatec/devise/wiki/How-To:-Use-Devise-generated-method-and-filters-for-controllers)
  • [Find a user when you have their credentials](https://github.com/plataformatec/devise/wiki/How-To:-Find-a-user-when-you-have-their-credentials)
  • [Make Devise work with other formats like mobile, iPhone and iPad (Rails specific)](https://github.com/plataformatec/devise/wiki/How-To:-Make-Devise-work-with-other-formats-like-mobile,-iPhone-and-iPad—-Rails-specific)
  • [Manage users through a CRUD interface](https://github.com/plataformatec/devise/wiki/How-To:-Manage-users-through-a-CRUD-interface)
  • [Mass password reset and email notification](https://github.com/plataformatec/devise/wiki/How-To:-Mass-password-reset-and-email-notification)
  1. JavaScript
  • [Use with BackboneJS models](https://github.com/plataformatec/devise/wiki/How-To:-Use-with-BackboneJS-models)
  1. Devise Internals
  • [List of Devise Controllers](https://github.com/plataformatec/devise/wiki/List-of-Devise-Controllers)
  1. Upgrading
  • [Upgrade to Devise 2.2](https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.2)
  • [Upgrade to Devise 2.1](https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.1)
  • [Upgrade to Devise 2.0](https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.0)
  • [Upgrade to Devise 2.0 migration schema style](https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.0-migration-schema-style)
  • [Migration legacy database](https://github.com/plataformatec/devise/wiki/How-To:-Migration-legacy-database)
  1. Migrating from other authentication plugins
  • [Migrate from restful_authentication to Devise](https://github.com/plataformatec/devise/wiki/How-To:-Migrate-from-restful_authentication-to-Devise)
  • [Add devise required columns to an existing users table](https://github.com/plataformatec/devise/wiki/How-To:-change-an-already-existing-table-to-add-devise-required-columns)
  • [Change an already existing table to add devise required columns](https://github.com/plataformatec/devise/wiki/How-To:-Change-an-already-existing-table-to-add-devise-required-columns)
  • Clone this wiki locally