Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

ASP.NET Core 2.0.1 with Azure B2C

$
0
0

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.

Json Configuration:

{
  "Authentication": {
    "AzureAdB2C": {
      "ClientId": "dc9f5601-cac2-4495-b03e-8746a4507a20",
      "Tenant": "easychurchweb.onmicrosoft.com",
      "SignUpSignInPolicyId": "B2C_1_signup",
      "SignInPolicyId": "B2C_1_login",
      "ResetPasswordPolicyId": "B2C_1_reset",
      "EditProfilePolicyId": "B2C_1_changeperfil",
      "RedirectUri": "https://localhost:44303/",
      "ClientSecret": "\"j2H2p4QbS4l08D9,",
      "ApiUrl": "https://easychurchweb.onmicrosoft.com/",
      "ApiScopes": "https://easychurchweb.onmicrosoft.com/",
      "Policy": "B2C_1_B2C_login"
    },

O OpenId Connect:

services.AddAuthentication(sharedOptions =>
            {
                sharedOptions.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                sharedOptions.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
            })
            .AddAzureAdB2C(options => Configuration.Bind("Authentication:AzureAdB2C", options))
            .AddCookie();

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.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>