Created
January 4, 2023 15:56
-
-
Save dpaluy/afe40f96cd425356fc4090561e4d39c1 to your computer and use it in GitHub Desktop.
Manually reset password with Device
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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