Skip to content

Instantly share code, notes, and snippets.

@dpaluy
Created January 4, 2023 15:56
Show Gist options
  • Select an option

  • Save dpaluy/afe40f96cd425356fc4090561e4d39c1 to your computer and use it in GitHub Desktop.

Select an option

Save dpaluy/afe40f96cd425356fc4090561e4d39c1 to your computer and use it in GitHub Desktop.
Manually reset password with Device
raw, hashed = Devise.token_generator.generate(User, :reset_password_token)
user = User.find_by(email: '[email protected]')
user.reset_password_token = hashed
user.reset_password_sent_at = Time.now.utc
user.save
# https://mysaas.com/users/password/edit?reset_password_token=raw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment