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 ?
The id_token value contains the information about the user's authentication. The ID token resembles the concept of an identity card, in a standard JWT format, signed by the OpenID Provider (OIDP). To obtain one, the client needs to send the user to their OIDP with an authentication request.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With