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
4
votes
3 answers

"undefined method 'becomes' for nil:NilClass" where it shouldn't

I was testing a snippet today unless resource.nil? resource = resource.becomes(Accounts::Admin) end this raises an error undefined method `becomes' for nil:NilClass if I do this unless resource.nil? a = resource.becomes(Accounts::Admin) …
Gus
  • 899
  • 9
  • 29
4
votes
3 answers

Require password only when changing password devise registration

I have a registration/edit form that is rendered through a Devise::RegistrationsController within my application. The way it works now you must provide your current password when making any updates to the form. They way I want it to work is that the…
Zack Herbert
  • 854
  • 1
  • 14
  • 32
4
votes
2 answers

Broken FB-omniauth after bundle update, invalid credentials

The oauth data doesn't go to controller action. Can't understand what's wrong. There is one more auth provider in this controller and it works well the core is absolutely same. devise 3.5.10 rails 4.2.4 devise.rb config.omniauth :facebook,…
nobilik
  • 704
  • 6
  • 27
4
votes
5 answers

No route matches [GET] "/users/sign_out" rails 5

When I try to sign out i am getting error of No route matches [GET] "/users/sign_out". this is my link tag for Signout. <%= link_to "Sign Out", destroy_user_session_path, method: :get , class: "nav-link" %> Here is what my routes related to my…
Salman Nausher
  • 141
  • 2
  • 9
4
votes
1 answer

How to integrate Devise REST API Login with lockable

I'm using Devise with lockable as login system in my application. It works fine with server generated pages. Now i am creating single page application endpoint with AngularJS (REST API). Login works fine but when I do fail to login then…
kalit
  • 158
  • 1
  • 11
4
votes
2 answers

Ruby on Rails: How to Configure the Devise Mailer?

I have made an application on Ruby on Rails. I'm using Devise and I need to use the recoverable password feature. I found these configurations on development.rb: config.action_mailer.default_url_options = { :host => 'localhost:3000' } …
Jorge do Carmo
  • 45
  • 1
  • 1
  • 5
4
votes
2 answers

How can track the time which one user is online? With Ruby on Rails

I have a Rails application using Devise for authenticate users but I want track the time for users online in the platform. I would like have a column in user table which save the time online for this user (hours, minutes..). For example, one user…
4
votes
1 answer

Rails 5 ActionCable error description and rejected connection

I made a basic chat with ActionCable authenticated with devise. module ApplicationCable class Connection < ActionCable::Connection::Base identified_by :current_user def connect self.current_user = find_verified_user …
Spike886
  • 558
  • 7
  • 21
4
votes
5 answers

Cannot load such file -- bcrypt_ext

I'm currently experiencing the failure of bcrypt's encryptor while using Devise for Rails 5.0.1. I never had this issue before with the earlier Rails 4.2. I can't register new users through Devise. I will post information with regards to my gemfile…
valcod3r
  • 159
  • 1
  • 9
4
votes
2 answers

Jruby :- Unable to install devise on windows using jruby

unable to install devise on windows using jruby =============================================== C:>jruby -S gem install devise Building native extensions. This could take a while... ERROR: Error installing devise: ERROR: Failed to build gem…
user504424
  • 41
  • 2
4
votes
3 answers

How to capture form errors in Sign In page using Devise

I'm using Devise for authentication and the sign in form uses flash notices instead of form errors to display any issues when signing in. But I want to highlight the appropriate form fields that have associated errors like normally happens in rails…
99miles
  • 10,382
  • 17
  • 71
  • 118
4
votes
3 answers

NameError uninitialized constant Model::Object

I'm new to ruby on rails. Ihe error I have is NameError in ReviewsController#create uninitialized constant User::Review Extracted source: @review = current_user.reviews.build(review_params) I read on other stack overflow questions that usually…
4
votes
3 answers

I want to customise devise gem's controllers, is it possible and how to do?

Is there a way to customise the devise controllers , as we can modify the devise views using the "rails g devise:views" generator command. ?? Ok purpose here is to create a statistics table's row for the current user as soon as a user is…
Hemanth
  • 4,662
  • 7
  • 36
  • 54
4
votes
1 answer

Capybara resets devise session after each request

Code example: login_as(user, scope: :user) visit user_edit_path #this is authorized # some expectations visit user_comments_path #this is not authorized, return 401, why? But if I add second login_as after first visit - everything works. I don't…
Alexander
  • 127
  • 1
  • 8
4
votes
1 answer

controller test: <302: Found> redirect to

I have a problem with unit testing in ruby on rails (rails v. 5.001). I use devise and cancancan for authorization. The user needs to login in a test unit, but how can I implement this without redirecting to http://www.example.com/users/sign_in?…
Peter
  • 599
  • 1
  • 5
  • 18
1 2 3
99
100