You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed the UID from OAuth requests are being stored as an Integer (cast via #to_i). I am not familiar enough with mongo to know whether there is significant performance gain by using an Integer over a string. However, this forces providers to use integer IDs for users, which is unfortunate (eg: UIDs are not an option).
Twitter uses integer uids, so it doesn't really matter. The reason why you are supposed to use strings is that you get the data in json, and ( tilts head ) javascript doesn't have a defined integer type. But, since the string can be converted to an integer reliably in ruby, it's not a problem.
There is theoretically no significant difference in storing the integer or the string version.
Right. I guess my question was brought up because I am interested in making it easy to integrate with other OAuth providers, and having this requirement requires all providers to use integers as their unique identifier for users. So, for example, a provider is not able to use UUIDs instead, because when it is cast via #to_i, it results in an ID of '0'...which is problematic.
I noticed the UID from OAuth requests are being stored as an Integer (cast via #to_i). I am not familiar enough with mongo to know whether there is significant performance gain by using an Integer over a string. However, this forces providers to use integer IDs for users, which is unfortunate (eg: UIDs are not an option).
The text was updated successfully, but these errors were encountered: