Click here to Skip to main content
15,867,921 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
See more:
Hi,


I am trying to make a google login to my website, my motive is to allow user to make login via his gmail id and to save his token in my database and to access their contacts.

For this I registered on code.google.com and got the

1. ClientID
2. Client Secret
3. RedirectUrl

It is working fine when someone click on google button and navigates to google login.
A big lenth of url appear in the address bar.
Once it gets login things are working fine,but suddenly it redirects to Default.aspx page.

1. I am confused that I have not mentioned anywhere "Default.aspx" while registering on code.google.com then why I am getting this page.

2. When a user click on google button and it navigates to google page to login with huge url in address bar. But if someone make an incorrect login then url turn to "https://accounts.google.com/ServiceLoginAuth" and now when I login with current credential then it take me to Redirect url that I had mentioned at code.google.com.
Now here how would I get the token of the user.


May be the way I am asking this, is not much clear. but I am not getting how to make a gmail login for my web application.


Please guide me..

Regards
Posted
Comments
Dholakiya Ankit 13-Nov-13 2:35am    
Gud question
Manish Kumar Namdev 13-Nov-13 2:47am    
Thanks Ankit, but I am still with this confusion looking on internet.. not getting it.
Bheeshm 13-Nov-13 3:16am    
https://code.google.com/p/google-api-dotnet-client/wiki/OAuth2

http://stackoverflow.com/questions/7577654/c-sharp-google-login
Dholakiya Ankit 13-Nov-13 5:07am    
Ya please give me link
when you get something until then i am cooking something for you
Kornfeld Eliyahu Peter 13-Nov-13 5:41am    
For your project, can you use framework 4 or better?

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