OAuthWebSecurity with Facebook not using email permission as expected

后端 未结 7 1130
不思量自难忘°
不思量自难忘° 2020-12-13 16:24

Using the new OAuthWebSecurity for authenticating with Facebook, I added the email permission on my Facebook application. Now, as I can read, I need to define a scope to be

相关标签:
7条回答
  • 2020-12-13 17:19

    I faced the same problem here. The only way I found to pass the "scope" parameter to facebook was coding my own OAuth client.

    To do it, you must extend and implement the abstract methods of DotNetOpenAuth.AspNet.Clients.OAuth2Client.

    On the GetServiceLoginUrl method you can add the scope parameter to the url. So, when you call the OAuthWebSecurity.VerifyAuthentication() method, the AuthenticationResult.UserName provides the user's email.

    An example can be found here.

    Good luck.

    0 讨论(0)
提交回复
热议问题