I'm implementing Google OAuth 2.0 and noticed that the unique user id returned by Google OAuth is 21 digits long. I thought BIGINT(20) would be enough for this need, but I'm confused now on seeing the length of the user id returned by Google OAuth. Any ideas on how I should go about this ?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
For saving the id, you should use varchar, beacuse as the data you are trying to save is from 3rd party, you can't be certain if the value will be numeric only(though google user id is numeric only but the convention is still not in our control).