Devise Giving Token Is Invalid Error After Updating Devise Or Devise Invitable

Posted By Weston Ganger

I have upgraded devise in some legacy app and got tripped up by this before.

With the release of Devise 3.1.0 they changed to using hashes of the token.

class RemoveLimitOnInvitationToken < ActiveRecord::Migration
  def up
    change_column :users, :invitation_token, :string, limit: nil

  def down
    change_column :users, :invitation_token, :string, limit: 60

It should now have proper tokens in the email link.

Related External Links:

Article Topic:Software Development - Ruby / Rails

Date:September 21, 2015