Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Devise Account Unlock Returning "Unlock Token is Invalid"

I have a standard devise implementation. Everything is working except for account unlocking (locking works fine).

I can unlock accounts in the console using unlock_access!. I can also locate the account using User.find_by_unlock_token. However, UnlocksController#show - specifically, resource_class.unlock_access_by_token(params[:unlock_token]) - returns an "Unlock token is invalid" error.

Any help would be be much appreciated. Thanks!

like image 240
Tim W Avatar asked Mar 21 '14 14:03

Tim W


1 Answers

This was a problem with a missed update to Devise. In the mailer template, @resource.unlock_token changed to @token. Works!

like image 137
Tim W Avatar answered Oct 15 '22 21:10

Tim W