• Allow users to Sign In using their username or email address
  • Create a username field in the users table
  • Create a migration:
  • Run the migration:
  • Strong parameters
  • Create a login virtual attribute in the User model
  • Tell Devise to use :login in the authentication_keys
  • Overwrite Devise's find_for_database_authentication method in User model
  • For ActiveRecord:
  • For Mongoid:
  • Update your views
  • Modify the views
  • Allow users to recover their password or confirm their account using their username
  • Configure Devise to use username as reset password or confirmation keys
  • Use find_first_by_auth_conditions instead of find_for_database_authentication
  • Update your views
  • Gmail or me.com Style