I have read many references to the Charles Miller best practices for tokens referenced here definitive-guide-to-form-based-website-authentication. But I have not seen any real examples.
My question is what should be used for the user name field? I am thinking this should not be a real name, nor an email. I was thinking of using the gravatar_id, or the user id number (1 .. n). The gravatar_id seems like overkill, and the id number seems weak. What are some better choices?
Edit I guess I am under the assumption the token should look something like this
"#{user.name}:#{SecureRandom.urlsafe_base64}" -> "user12:0a5be29627332034d4dd8a"
but having that user12 in plain text seems wrong. So I think I am missing something basic with the concept