Questions tagged [devise]

Devise is an authentication gem for Ruby-on-Rails. It supersedes previous solutions such as Restful Authentication or Authlogic.

Devise is an authentication gem for Ruby-on-Rails. It supersedes previous solutions such as Restful Authentication or Authlogic.

Devise is built as a Rails engine and is a full-featured drop-in solution that comes with a complete set of controllers and views to support features such as user registration, user password recovery, user authentication, user email verification and many more.

Devise works with Rails 3 and Rails 4, and also supports a branch compatible with Rails 2.3.

Devise was originally developed by José Valim and Carlos Antônio da Silva and released at Rails Summit Latin America 2009.

Resources

14662 questions
392
votes
29 answers

No route matches "/users/sign_out" devise rails 3

I've installed devise on my app and applied the following in my application.html.erb file:
<% if user_signed_in? %> Signed in as <%= current_user.email %>. This cannot be cheese? <%= link_to 'Sign out',…
vich
  • 11,638
  • 13
  • 46
  • 60
237
votes
5 answers

Override devise registrations controller

I have added a field to the sign-up form that is based on a different model, see How do I use nested attributes with the devise model for the gory details. This part is working fine. The problem now is when I save, it is failing in the create action…
Craig McGuff
  • 3,860
  • 6
  • 27
  • 35
182
votes
6 answers

Heroku/devise - Missing host to link to! Please provide :host parameter or set default_url_options[:host]

I am trying to push my app on heroku. I am still in dev. I use devise with the confirmable module. When I try to add a user with the heroku console I got this error: Missing host to link to! Please provide :host parameter or set…
benoitr
  • 5,684
  • 6
  • 38
  • 66
150
votes
5 answers

Create a devise user from Ruby console

Any idea on how to create and save a new User object with devise from the ruby console? When I tried to save it, I'm getting always false. I guess I'm missing something but I'm unable to find any related info.
Martin
  • 10,462
  • 22
  • 76
  • 133
147
votes
15 answers

How do I remove the Devise route to sign up?

I'm using Devise in a Rails 3 app, but in this case, a user must be created by an existing user, who determines what permissions he/she will have. Because of this, I want: To remove the route for users to sign up. To still allow users to edit their…
Nathan Long
  • 113,812
  • 91
  • 316
  • 418
132
votes
8 answers

All Ruby tests raising: undefined method `authenticate' for nil:NilClass

Most of my tests are raising the following and I don't understand why. All methods call raise the 'authenticate' error. I've checked the code if there was a method called "authenticate" but there is no such method. 1) Admin::CommentsController…
Jeffrey W.
  • 4,149
  • 3
  • 15
  • 18
131
votes
3 answers

How do I set up email confirmation with Devise?

Is there a tutorial out there that explains how to set up Devise's signup confirmation email from scratch (in both development and production), i.e. if you don't have Action Mailer set up? Google searching has just turned up a bunch of separate…
jyli7
  • 2,601
  • 5
  • 19
  • 31
130
votes
5 answers

Devise form within a different controller

I am using a devise gem for sign_in/sign_out procedures. I generated views files from devise, using rails g devise views I saw there was a devise/sessions/new.html.erb file which contained a form for sign_in. I created another file…
user482594
  • 14,066
  • 18
  • 62
  • 92
127
votes
21 answers

rails - Devise - Handling - devise_error_messages

in my user edit page, there is a line as follows: <%= devise_error_messages! %> The problem is this does not output errors the standard way that the rest of the app does: <% flash.each do |key, value| %>
<%= value…
AnApprentice
  • 97,752
  • 174
  • 583
  • 971
110
votes
4 answers

Devise - How do I forbid certain users from signing in?

I am using Devise for authentication in my application. How do I forbid certain users from signing in - kind of disable a user?
Dimitar Vouldjeff
  • 1,939
  • 3
  • 18
  • 23
100
votes
16 answers

Devise Secret Key was not set

I am developing a Rails 4 app using the Active Admin gem for the administration back end. Active Admin in turn uses Devise for user authentication. Now, when I try to deploy the app using capistrano on the VPS server, I get the below error: rake…
user1139144
99
votes
4 answers

How to verify a user's password in Devise

I'm having a problem matching user password using devise gem in rails. User password stored on my db which is encrypted_password and i am trying to find user by password, but I don't understand how to match password from form and encrypted_password…
poporul
  • 1,081
  • 1
  • 8
  • 10
98
votes
8 answers

Devise password reset from Rails console

While running an app how do you select a user by email address and then set the password manually within rails console for Devise? Also, where would I go to review documentation to cover more details in this regard to manipulation of accounts while…
ylluminate
  • 11,132
  • 15
  • 74
  • 144
93
votes
9 answers

Share session (cookies) between subdomains in Rails?

I have an app setup where each user belongs to a company, and that company has a subdomain (I am using basecamp style subdomains). The problem that I am facing is that rails is creating multiple cookies (one for lvh.me and another for…
Wahaj Ali
  • 3,960
  • 2
  • 19
  • 34
1
2 3
99 100