MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Google Login does not work (Zatvorena) (Mono Support )

15774 put(a) pogledan, 6 odgovor(a) 18.11.2013. 13:33:23Kreirao(la) bkkmono
bkkmono

bkkmono

18.11.2013. 13:33:23
Hello,

I am trying to set up Social Login in my MonoX website, I could do this successfully with Facebook Login and Twitter Login, but not for Google Login.

I registered my application in Google API Project to create my own Client ID and Client Secret, they come with OAuth 2.0 Client ID version and everything is OK. My Client ID looks like this form: 23123123.apps.googleusercontent.com, then I added them in web.config like this: 
<add WrapperName="GoogleWrapper" ConsumerKey="23123123.apps.googleusercontent.com" ConsumerSecret="client secret key" AdditionalScopes="https://www.googleapis.com/auth/userinfo.profile" />
But I got an error when I tried to login using Google Login in the page Login.aspx, the message shows like this: 
"Unable To Connect To Specified Social Network   Invalid Request Token received.Provider returned: openid.ns"

Additionally, I also changed WrapperName from GoogleWrapper to GoogleHybridWrapper, but not work.

How should I do to resolve this problem?



Ovaj sadržaj još nije ocijenjen. 
434 Reputacija 51 Ukupno objava
khorvat

khorvat

18.11.2013. 13:45:18
This should be fixed / implemented in the latest MonoX nightly build. We will provide you with more information soon.

Regards
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava
mzilic

mzilic

18.11.2013. 15:19:40
Hello,

When you upgrade to the latest nightly build you need to make a few changes in your solution:
1. In the web.config edit the AdditionalScops for GoogleWrapper, ex:
<add  WrapperName="GoogleWrapper" ...  AdditionalScopes="openid profile email" />
2. On the Google API Console ensure that the Web Origin setting matches your domain URI as for the Redirect URI we recommend that you use the following URI setting: http://mysiteurl.com/socialauth/validate.sauth

Regards,
Mario
Ovaj sadržaj još nije ocijenjen. 
2218 Reputacija 300 Ukupno objava
bkkmono

bkkmono

18.11.2013. 15:48:12
Thanks for your answer, MZILIC but I don't still get it.

What is openid profile email?

What is http://mysiteurl.com/socialauth/validate.sauth ?

Please explain me more.
Ovaj sadržaj još nije ocijenjen. 
434 Reputacija 51 Ukupno objava
mzilic

mzilic

18.11.2013. 15:57:58
What is openid profile email?
These are Google OAuth 2.0 scopes. Please refer Google API for more information: https://developers.google.com/accounts/docs/OAuth2Login

This is the URI where Google sends its response and socialauth/validate.sauth is the SocialAuth handler which handles that response. More information about the redirect URI is available on the page I mentioned above as well.

Regards
Ovaj sadržaj još nije ocijenjen. 
2218 Reputacija 300 Ukupno objava
bkkmono

bkkmono

20.11.2013. 10:55:02
Thank you.
After I upgraded my site to the latest nightly version of MonoX and changed Redirect URI on Google Consent Screen to http://mysiteurl.com/socialauth/validate.sauth as your suggestion, I could successfully login to my site with my Google account.
Ovaj sadržaj još nije ocijenjen. 
434 Reputacija 51 Ukupno objava