-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Microsoft Account OAuth2 sign-on stop to work after update the Microsoft.Owin packages from v3.0.1 to v3.1.0 #112
Comments
In the 3.1 release all of the security packages were updated to use the latest APIs available from their respective providers. In this instance the MicrosoftAccount 3.0.1 package was using an obsolete API to authenticate users and was moved to a new API. The new API uses different values for Scope (https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-scopes). However, you don't need to specify any scopes to get the e-mail, you can remove that parameter. There have been no changes to this behavior for 4.0.0. #48 was a separate issue. |
Hi @Tratcher Thank you very much for your prompt reply! ================================ Scenario 1 (v3.1.0 + Scope = { "wl.emails" }) ================================ Scenario 2 (v3.1.0 + without Scope) ================================ Scenario 3 (4.0.0-alpha1 + without Scope) ================================ I other words, I have to use the 4.0.0-alpha1 without any Scope for continue able to read email info from the Microsoft Account. Is there any plan for release the final 4.0.0 version soon? Feel free for close this issue as dup of #89 |
Yes 4.0.0 will be out soon, we're just waiting for feedback. |
Thanks @Tratcher In other words, from now on, GoogleOAuth2AuthenticationOptions and MicrosoftAccountAuthenticationOptions do not need nothing more than ClientId and ClientSecret to the System.Security.Claims.ClaimsPrincipal.Current.FindFirst(System.Security.Claims.ClaimTypes.Email).Value has the user email account info. Is there any possibility of FacebookAuthenticationOptions having similar behavior? Currently the Fields = { "email" }, Scope = { "email" } are required to the System.Security.Claims.ClaimsPrincipal.Current.FindFirst(System.Security.Claims.ClaimTypes.Email).Value , |
@luronumen That's a good idea. Can you open a new bug so we don't loose track of it? |
Sure @Tratcher! I just open the issue #113 for traking it. Besides Facebook do you think it would be possible to do something similar for Twitter as well?
I noticed you have work to simplify Twitter email account here: #765 |
Twitter does not have it enabled by default because it has significant pre-reqs on their end. You have to contact support to enable it. |
I see. But I have set in my Twitter Apps the Access level to Read-only and Can request a user's email address option as well. Is there something more that I have to do to have the user email associated with the Twitter account through the System.Security.Claims.ClaimsPrincipal.Current.FindFirst(System.Security.Claims.ClaimTypes.Email).Value? Using app.UseTwitterAuthentication(new TwitterAuthenticationOptions { ConsumerKey = "MyConsumerKey", ConsumerSecret = "MyConsumerSecret" }); is returning System.NullReferenceException when I try to read the user email info through System.Security.Claims.ClaimsPrincipal.Current.FindFirst(System.Security.Claims.ClaimTypes.Email).Value |
You also need |
it does not working. Error CS0117 'TwitterAuthenticationOptions' does not contain a definition for 'RetrieveUserDetails' |
Sorry, I forgot which repo I was in. E-mail support was only added to ASP.NET Core. The hideous event code workaround should be similar for Katana. aspnet/Security#765 (comment) |
Thanks for the clarification @Tratcher Is there any possibility to design something similar for the ASP.NET Framework by adding the RetrieveUserDetails property on TwitterAuthenticationOptions class as well? Do you think it would be good we opened an issue for tracking it? |
We're not planning significant feature work like this for Katana. Our current focus is bug fixes and keeping it up to date with external providers, dependencies, etc.. |
I see. Okay then @Tratcher! |
4.0.0-Microsoft Account is compatible with Net framework 4.5.2? |
I have updated the following Nuget packages from v3.0.1 to v3.1.0:
And after these updates the following issue is displayed when I try to authenticate using a Microsoft Account:
Correlation ID: 1a411cc0-446c-42bb-8659-cdd7dd9e6199
AADSTS70011: The provided value for the input parameter 'scope' is not valid. The scope wl.emails is not valid.
Important notes:
I have attached the Startup.Auth.cs class from the System for your better debuging.
For more details you can also check the ASP.NET MVC 5 - Microsoft Account OAuth2 sign-on stop to work after update the Microsoft.Owin packages from v3.0.1 to v3.1.0
The text was updated successfully, but these errors were encountered: