Adds support for authentication keys other than email.
Breaking changes. Token digest is stored in the database, not the actual token. This will invalidate all your existing tokens (logging users out) unless you migrate existing tokens. In order to migrate execute:
AuthenticationToken.find_each do |token|
token.body = Devise.token_generator.digest(AuthenticationToken, :body, token.body)
token.save!
end
assuming that your model which stores tokens is called AuthenticationToken
.