Creating a Secure ID/UID for a Password, token authentication type system

Hello, I’m looking for a way to create a very secure UID that will act
as a authentication token.

I had been using the UUID gem but learned they are not secure. I’d
like to learn what to use. What is the method of choice these days in
ruby/rails 3?

On Nov 25, 4:53pm, CuriousNewbie [email protected] wrote:

Hello, I’m looking for a way to create a very secure UID that will act
as a authentication token.

I had been using the UUID gem but learned they are not secure. I’d
like to learn what to use. What is the method of choice these days in
ruby/rails 3?

ActiveSupport::SecureRandom can generate cryptographically secure
(assuming there is underlying OS support) random bytes (On ruby 1.9 I
believe this is built in and you don’t need to use Active Support)

Fred