Google Login Tutorial - Part 5
In previous part of Google Login Tutorial we have discussed step 4 Authenticating User . Now in this part we are going to discuss step 5 and step 6. Note that this is the last part of tutorial. Step 5 : Obtaining user information from ID Token: An ID Token is a JWT (JSON Web Token), that is, a cryptographically signed Base64-encoded JSON object. Normally, it is critical that you validate an ID token before you use it, but since we are communicating directly with Google over an intermediary-free HTTPS channel and using your client secret to authenticate yourself to Google, we can be confident that the token you receive really comes from Google and is valid. If our server passes the ID token to other components of your app, it is extremely important that the other components validate the token before using it. An ID token’s payload : An ID token is a JSON object containing a set of name/value pairs. Here’s an example, formatted for readability: {"iss":"accounts.google.co