devise

Ruby on Rails: Unable to sign out of application in production

那年仲夏 提交于 2020-01-14 02:29:28
问题 I have an application deployed on Heroku. Everything is working fine, except for signing out. When I click the link to sign out I get this error: "The page you were looking for doesn't exist. You may have mistyped the address or the page may have moved. If you are the application owner check the logs for more information." For user authentiation I am using of course the devise gem, I have multiple solutions hovering around Stack Overflow however none of them worked for me. Take a look at the

Ruby on Rails: Unable to sign out of application in production

不羁岁月 提交于 2020-01-14 02:29:24
问题 I have an application deployed on Heroku. Everything is working fine, except for signing out. When I click the link to sign out I get this error: "The page you were looking for doesn't exist. You may have mistyped the address or the page may have moved. If you are the application owner check the logs for more information." For user authentiation I am using of course the devise gem, I have multiple solutions hovering around Stack Overflow however none of them worked for me. Take a look at the

devise_security_extension gem is not maintained nor updated to Rails 5, is there other repo?

会有一股神秘感。 提交于 2020-01-13 20:29:10
问题 In my current project we are using devise_security_extension. The project uses rails 4.2.5.2 and ruby 2.1.9. We are in a process to update to Rail 5.1.5 with ruby 2.4.3. Unfortunately this gem is not updated to Rails 5 and it's not maintained anymore. Also the version from rubygems, even is 0.10.0, is not containing the last changes from github. That are some forks that solve partially the update, but the company that I work for do not allow to load from github.com, only from rubygems.org.

devise_security_extension gem is not maintained nor updated to Rails 5, is there other repo?

你说的曾经没有我的故事 提交于 2020-01-13 20:29:07
问题 In my current project we are using devise_security_extension. The project uses rails 4.2.5.2 and ruby 2.1.9. We are in a process to update to Rail 5.1.5 with ruby 2.4.3. Unfortunately this gem is not updated to Rails 5 and it's not maintained anymore. Also the version from rubygems, even is 0.10.0, is not containing the last changes from github. That are some forks that solve partially the update, but the company that I work for do not allow to load from github.com, only from rubygems.org.

devise_security_extension gem is not maintained nor updated to Rails 5, is there other repo?

好久不见. 提交于 2020-01-13 20:29:06
问题 In my current project we are using devise_security_extension. The project uses rails 4.2.5.2 and ruby 2.1.9. We are in a process to update to Rail 5.1.5 with ruby 2.4.3. Unfortunately this gem is not updated to Rails 5 and it's not maintained anymore. Also the version from rubygems, even is 0.10.0, is not containing the last changes from github. That are some forks that solve partially the update, but the company that I work for do not allow to load from github.com, only from rubygems.org.

How to pass additional data to devise mailer?

99封情书 提交于 2020-01-13 16:56:09
问题 I have a rails app that can handle many subdomains, and I have multiple live versions running with different domain names. This causes the URLs to be anywhere between mywebsite.com company1.mywebsite.com company1.mytestwebsite.com Devise has mailers that use links for resetting passwords and such. These links are sometimes incorrect and send me to the incorrect website because the host name is sometimes different from that of the the default URL from /config/environments/production.rb :

Using Devise before_action :authenticate_user! doesn't do anything

徘徊边缘 提交于 2020-01-13 09:09:17
问题 I am trying to require login on all pages on my Rails 4 web site. In the ApplicationController I have added before_action :authenticate_user! , but it simply doesn't do anything. I have tried to add the same before_action :authenticate_user! to another controller, and it works fine. Do I need to do something else to the ApplicationController, to make the login be required on all actions (Except signup/signin)? 回答1: Here's the actual code we use: #app/controllers/application_controller.rb

Using Devise before_action :authenticate_user! doesn't do anything

会有一股神秘感。 提交于 2020-01-13 09:05:11
问题 I am trying to require login on all pages on my Rails 4 web site. In the ApplicationController I have added before_action :authenticate_user! , but it simply doesn't do anything. I have tried to add the same before_action :authenticate_user! to another controller, and it works fine. Do I need to do something else to the ApplicationController, to make the login be required on all actions (Except signup/signin)? 回答1: Here's the actual code we use: #app/controllers/application_controller.rb

How to make passwords optional using Devise?

拥有回忆 提交于 2020-01-13 05:35:07
问题 How can I make the password optional into the registration and login when authenticating a user (if no password then it will just use the e-mail) using Devise. Although if they register with a password (or update it later) it should then be require for login. How can I accomplish this using Devise? Note: I'm using Rails 3.0.1 and Devise 1.1.rc0 回答1: Found in the devise email group by Nat Budin: class User < ActiveRecord::Base devise :database_authenticatable, :validatable protected def

Stub authentication in request specs

我怕爱的太早我们不能终老 提交于 2020-01-12 14:28:49
问题 I'm looking for the way to do this but in request specs. I need to log in and log out a double or instance_double to Devise instead of an actual ActiveModel/ActiveRecord. By using the code in the wiki page: module RequestSpecHelpers def sign_in(user = double('user')) if user.nil? allow(request.env['warden']).to receive(:authenticate!).and_throw(:warden, {:scope => :user}) allow(controller).to receive(:current_user).and_return(nil) else allow(request.env['warden']).to receive(:authenticate!)