I am trying to regenerate confirmation token for the users who have not confirmed their accounts yet. I want to resend confirmation email to the user say after few days.I am following this link to regenerate the new token for that user, and its generating it but still its not working.
https://github.com/plataformatec/devise/issues/2615.
and I am following these steps on my console locally.
@user = User.find_by_email("[email protected]")
token = Devise.token_generator.generate(@user.class, :confirmation_token)
then in token i am getting array such as
token = ["gfbgk4535843tbk","8545kjbng8hguhggre8gergerkgjebg8gergkerjgg9ergejgn"]
then i am just sending an email like this
Devise::Mailer.confirmation_instructinos(@user,token.last).deliver
then its delivering an email to that user, but when user clicks on confirm account it takes user to the site but when user tries to login its not working.
config.reconfirmable = true
by doing this in config/devise.rb file ??? – Gaurav Mamidwar