Fetch Gmail user information for social login purpose

Hello friends,

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.

Before starting the process of fetching Gmail user information we must register our application through the  Google APIs Console. This registration process accommodates both Google and our application by set of values, like client_id, client_secret, JavaScript orgins, redirect_uri, etc.

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.

https://developers.google.com/accounts/docs/OAuth2UserAgent

Hope this will help you.

Thanks.

Speak Your Mind

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: