Last active
June 2, 2017 17:17
-
-
Save JosiahSiegel/48007c82157e76ebf5d3 to your computer and use it in GitHub Desktop.
#Rails Generate unique authorization token for user
This file contains 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
begin | |
auth_token = SecureRandom.uuid.gsub(/\-/,'') | |
end while User.exists?(auth_token: auth_token) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment