I got stuck for sometime by getting the issue.
When registering a new user with :confirmable in my devise user model, when the user clicks on the e-mail confirmation link, they receive an “Invalid confirmation token” error message
Found some solution by searching about this,
config.allow_insecure_token_lookup = true (Never do it in your devise initilizer because it’s a security threat)
NOTE: This problem only arising in Devise version 3.1.X
So i have fixed the issue only by changing in the below file,
<%= link_to ‘Confirm my account’, user_confirmation_url(:confirmation_token => @resource.confirmation_token) %>
<%= link_to ‘Confirm my new account’, confirmation_url(@resource, :confirmation_token => @token) %>
Just replace the old token from resource with the new instance variable
Hope it will help you out.