DotNetOpenAuth.GoogleOAuth2 icon indicating copy to clipboard operation
DotNetOpenAuth.GoogleOAuth2 copied to clipboard

AuthenticationResult - UserName, email

Open petrparik opened this issue 10 years ago • 0 comments

Hello, I used this, but I have a problem. My code is like this:

 DotNetOpenAuth.GoogleOAuth2.GoogleOAuth2Client.RewriteRequest();
 AuthenticationResult result =  OAuthWebSecurity.VerifyAuthentication(Url.Action("ExternalLoginCallback", new { ReturnUrl = returnUrl           }));

Before, result.UserName contained users email. Now it contains only name. What can I do so it contains email address?

In RegisterAuth method I have this:

 var client = new DotNetOpenAuth.GoogleOAuth2.GoogleOAuth2Client(googleClientID, googleClientID);
 var extraData = new Dictionary<string, object>();
 OAuthWebSecurity.RegisterClient(client, "Google", extraData);

Thanks a lot, Petr

petrparik avatar Jun 24 '15 14:06 petrparik