To simplify the user signup and login process the use of social login is increasing day by day. Taking this fact in mind here I will discuss about how to fetch Gmail user information for social login purpose.
To fetch Gmail user information we have to use Google API and to access Google API we have to use OAuth 2.0.
Now the process starts from redirecting a user to Google with a set of query string variables to indicate the type of Google API access the user wants. After that Google performs the user authentication and consent, and it returns the access token as a response.
The process of fetching Gmail user information can succeed only if we access a Google API after receiving the access token and validating it.
Now above is the basic process to get Gmail user personal information, but as a developer we have to implement this process by coding. In coding you have to perform the steps given in the below link.
Hope this will help you.