Click here to Skip to main content
15,036,145 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I want to integrate google login in my ASP.NET website application..

I googled and ended up getting following help on

1) Register your application into Google to have client ID and client secrete key
a. For basic understating about Google API
b. For Registering your application
i. Login here
ii. Here is how to setup

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

I got ClientID, Client secret key etc., even I've downloaded Jason code.. but not being able to use that code.. also it asks me to change my web.config settings(not getting exactly what to change in web.config)

I just want to know what code I should add on Gconnect(used on my Login form) button to serve 'login with your google' a/c

Please Help Thanks in advance
Updated 29-Jul-13 0:53am
[no name] 29-Jul-13 6:29am
You would need to go back to and ask them.

1 solution

Open the downloaded folder. Open the web.config XML configuration file. You will find something like below code.
    <add key="google_clientId" value="" />
    <add key="google_clientEmail" value="" />
    <add key="google_clientSecret" value="xxxxxxxxxxxx" />
    <add key="google_RedirectUrl" value="" />
    <add key="google_JavaScriptOrigin" value="" />

This is what you have to change.

sameer.pantvaidya 29-Jul-13 8:15am
Thanks Rohan.. but it will be better if u can further help me out with complete solution..
Thanks7872 29-Jul-13 8:31am
It is long process so cant be directed here. Everything is ready with the code you downloaded. Follow the procedure as suggested in pdf document,it will definitely work.
sameer.pantvaidya 29-Jul-13 8:39am
okay sure.. thanks for the above help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900