Last post Dec 06, 2017 07:53 AM by gtscdsi
Dec 03, 2017 12:57 PM|Fernando Ralha|LINK
Hello, I am developing a WebApp that uses the identity management system of Azure B2C. The system is already running but with a problem: a login page or B2C registration with a Microsoft account and Facebook is not being accessed. The system makes a call
to the link according to a policy called faster facing Home as if it has not authenticated. I have debugged and passive code for the OnRedirectToIdentityProvider event but it does not go into the OnAuthorizationCodeReceived Token event. I've done all the tests
possible and I do not know what's happening.
O OpenId Connect:
sharedOptions.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
sharedOptions.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
.AddAzureAdB2C(options => Configuration.Bind("Authentication:AzureAdB2C", options))
I got a working example in GitHub and I
changed the application data and it did not work. With the data that came with the code worked. So I do not know where the problem is.
I'm grateful for the help.
Dec 04, 2017 02:34 AM|Brando ZWZ|LINK
Hi Fernando Ralha,
I got a working example in GitHub and I changed the application data and it did not work. With the data that came with the code worked. So I do not know where the problem is.
According to your description and error message, I couldn't directly find the reason why it doesn't go into the OnAuthorizationCodeReceived Token event.
Could you please post more details about your OnRedirectToIdentityProvider event? Have you got any error message?
If you could post more details information, it will be more easily for us to repro the issue and find solution.
Dec 04, 2017 11:35 AM|Fernando Ralha|LINK
Of course! Thanks for the answer!
Aplication no B2C: https://drive.google.com/open?id=1qq3rOJrXBhqRu7unuQd8AMFA2N0hMrKU
Session Controller: https://drive.google.com/open?id=1yrWIl7ejyuyY70EmxyLOp3drsNwLG8lA
Classe AdB2COptions: https://drive.google.com/open?id=1eZE3PM75hPeIEyFiwOgUrlPkwloA8D4i
I noticed that the problem is not in the OnAuthorization event. It is in the RedirectToProvider event even though it is not accessing the system.
My app uses the same code from this example here: https://github.com/Azure-Samples/active-directory-b2c-dotnetcore-webapp
A few more debugs this weekend and I realized that the problem might be at the endpoint. I do not know if something has changed with some B2C upgrade. The version of Open Id I'm using is 2.0.1 and my app is ASP.Core 2.0.1. The example is 2.0.
Dec 06, 2017 07:53 AM|gtscdsi|LINK
I suggest you to attach the error message when you are debugging. As ASP.NET developer, I'm not familiar with Azure AD B2C, it takes time for me to start from the feature of Azure BC.
And if this is Azure AD B2C related, you should be able to raise service ticket to get professional support about the usage of Azure AD B2C.