Authenticating users properly is important to their and your safety and security, and using well-debugged code written by others is generally a best practice. Authenticating the user involves obtaining an ID token and validating it.ID tokens are a standardized feature of Open ID Connect designed for use in sharing identity assertions on the Internet.Provides validation that the access token is tied to the identity token.
The implicit flow is significantly more complicated because of security risks in handling and using tokens on the client side.
If you need to implement an implicit flow, we highly recommend using Google Sign-In.
Make sure you set up your app in the API Console to enable it to use these protocols and authenticate your users.
When a user tries to log in with Google, you need to: https://accounts.google.com/o/oauth2/v2/auth?
The documentation found in Using OAuth 2.0 to Access Google APIs also applies to this service.