devise-confirmable

Devise Confirmation invalid on first send

筅森魡賤 提交于 2019-12-04 14:46:33
I have a Rails 4 app with Devise 3.2.2 using :confirmable , and am running into an issue with it sending invalid confirmation tokens, but only the first time . After you resend the confirmation token, the link works. The relevant routes: devise_for :users, skip: [:sessions, :passwords, :confirmations, :unlocks, :registrations, :invitations] as :user do ... # joining get '/register' => 'devise/registrations#new', as: 'new_user_registration' post '/register' => 'devise/registrations#create', as: 'user_registration' ... end ...and the mail template in question: <p>Welcome <%= @email %>!</p> <p

Rails: Devise: Sending an email after user comfirms registration

家住魔仙堡 提交于 2019-12-04 10:49:41
My application is using Devise, and is sending out confirmation emails properly, and confirming users properly as well after they click on the confirmation link. I would also like to send a second email AFTER the user is confirmed. There is a lot of advice on how to delay confirmation, or 2-step confirmation, but nothing on what I'm looking for (that I can find). The Devise::Module::Confirmable documentation tells me that the method to use is confirm!, but I am not sure how to do this. Any ideas? rpedroso Rails Devise: after_confirmation Simply define an after_save callback that checks to see

Rails: Devise: How can I edit user information?

做~自己de王妃 提交于 2019-12-01 04:50:38
问题 I have a Rails app set up using Devise, with a Registration controller. What's working so far: New user registration Login Logout Home About Confirmation Password reset Not working is edit, as in I can't figure out the URL/REST call I should be making to get edit to show up. I do have a views/registrations/edit.html.erb page. Following is the portion of my routes that's specific to Registration: cancel_user_registration GET /cancel(.:format) registrations#cancel user_registration POST /

Rails Devise prevent login immediately after Signup without using Confirmable

跟風遠走 提交于 2019-11-30 16:33:07
Use Case: Admin should be able to create user, and it should not attempt to login. Public User can crate account and after signup he should be redirected to sign-in page rather signing him in immediately. Can somebody help me with this ? Thanks :) Erez Rabih What you need to do is to override Devise's RegistrationsController create method. There is an excellent explanation for how to do it here . This is Devise create action: # POST /resource def create build_resource if resource.save if resource.active_for_authentication? set_flash_message :notice, :signed_up if is_navigational_format? sign

Why won't Devise allow unconfirmed users to login even when allow_unconfirmed_access_for is set?

妖精的绣舞 提交于 2019-11-30 13:14:40
问题 We have an existing user base and are adding email confirmation. Confirmation is optional, but will allow additional features. Users are not required to confirm. I've added the confirmable module and ran migrations. Confirmation works as advertised. But, users cannot login since they are not confirmed. All current users have nil confirmation values, which is what we want (users can go back and confirm their email at any time). I've followed all the Devise wiki articles and set allow

Rails Devise prevent login immediately after Signup without using Confirmable

谁说胖子不能爱 提交于 2019-11-29 23:21:55
问题 Use Case: Admin should be able to create user, and it should not attempt to login. Public User can crate account and after signup he should be redirected to sign-in page rather signing him in immediately. Can somebody help me with this ? Thanks :) 回答1: What you need to do is to override Devise's RegistrationsController create method. There is an excellent explanation for how to do it here. This is Devise create action: # POST /resource def create build_resource if resource.save if resource

Devise with Confirmable - Redirect user to a custom page when users tries to sign in with an unconfirmed email

回眸只為那壹抹淺笑 提交于 2019-11-28 07:33:10
With the Confirmable module enabled, Devise will not allow an unconfirmed user to sign in after a predefined period of time has elapsed. Instead the user is redirected back to the sign in page with the flash message "You have to confirm your account before continuing". This is an undesirable interaction model, as a flash notice does not provide adequate space to properly explain to the user why access has been denied, what "confirm your account" means, provide a link to resend the confirmation, and instructions on how to check your spam folder and so on. Is there a way I can change this

Devise “Confirmation token is invalid” when user signs up

点点圈 提交于 2019-11-28 07:09:20
Using Rails 4 and Devise 3.1.0 on my web app. I wrote a Cucumber test to test user sign up; it fails when the "confirm my account" link is clicked from the e-mail. Scenario: User signs up with valid data # features/users/sign_up.feature:9 When I sign up with valid user data # features/step_definitions/user_steps.rb:87 Then I should receive an email # features/step_definitions/email_steps.rb:51 When I open the email # features/step_definitions/email_steps.rb:76 Then I should see the email delivered from "no-reply@mysite.com" # features/step_definitions/email_steps.rb:116 And I should see "You

Avoid sign-in after confirmation link click using devise gem?

霸气de小男生 提交于 2019-11-27 19:18:03
I am using devise gem, after clicking on the confirmation link, I want to directly sign-in. At present it is asking to sign-in again. Recently I have added the following in the devise initialize file: config.allow_insecure_token_lookup = true config.secret_key = 'a8d814803c0bcc735ce657adc77793459d00154cdd7532c13d3489600dc4e963f86e14beb593a32cbe9dbbe9197c9ce50a30102f363d90350052dc8d69930033' Any suggestions? In previous Devise versions, the user was automatically signed in after confirmation. This meant that anyone that could access the confirmation e-mail could sign into someone’s account by

Devise with Confirmable - Redirect user to a custom page when users tries to sign in with an unconfirmed email

随声附和 提交于 2019-11-27 01:52:25
问题 With the Confirmable module enabled, Devise will not allow an unconfirmed user to sign in after a predefined period of time has elapsed. Instead the user is redirected back to the sign in page with the flash message "You have to confirm your account before continuing". This is an undesirable interaction model, as a flash notice does not provide adequate space to properly explain to the user why access has been denied, what "confirm your account" means, provide a link to resend the