Wednesday 19 June 2013

Login with google using Asp.NET

 How to setup Login with Google using Asp.net

1) Register your application into Google to have client ID and client secrete key
a. For basic understating about Google API
i. https://developers.google.com/accounts/docs/OAuth2#basicsteps
b. For Registering your application
i. Login here
1. https://accounts.google.com/ServiceLogin?service=devconsole&passive=1209600&continue=https://code.google.com/apis/console/&followup=https://code.google.com/apis/console/
ii. Here is how to setup
c.
 
i.
2) Download source code
3) Update web.config file’s application setting keys
4) Upload code into your domain, it will not work with localhost
5) in sample application, I have not used any 3rd part dll, it is pure java script base authentication
6) Google is returning, user data in JSON format, I have used simple string functions to manipulate it, but you can use proper JSON string parser.
7) In this sample you will get Google ID, Email, first Name and Last Name



No comments:

Post a Comment