When allowing login by OAuth (such as OpenID, Facebook, Twitter, etc), we save the access token given by the Oath provider in mysql database for future authentication. In some tutorials, the column for saving access token is varchar(255) and some use text. I wonder if the access token (by common websites such as facebook and twitter) is longer than 255 character needing text column. Should we consider this possibility?
When allowing login by OAuth (such as OpenID, Facebook, Twitter, etc), we save the
Share
You won’t run in to the problem with Facebook or Twitter from my experience (In 3+ years there hasn’t been a problem for me on my systems storing it at length 255).That said, a quick search did bring up this question on Quora http://www.quora.com/OAuth-1/Whats-the-maximum-length-of-an-OAuth-access-token-key-secret-pairThis answer is incredibly old and incorrect. Look at the latest answers. Do not limit the size of the access token.