I've been playing with AzureAD B2C using ASP.NET Core 3.1
I've already set up an AzureAD B2C using the project wizard and it's worked well. I now need to retro fit an existing application to use AzureAD B2C.
I've imported the same package from the existing application, ie..
I've setup the appsetting.json file ...
"AzureAdB2C": {
"Instance": "https://xxx.b2clogin.com/tfp/",
"ClientId": "xxx-xxx-xxx-xxx-xxx",
"CallbackPath": "/signin-oidc",
"Domain": "xxx.onmicrosoft.com",
"SignUpSignInPolicyId": "B2C_1_SignInRegister",
"ResetPasswordPolicyId": "B2C_1_PasswordReset",
"EditProfilePolicyId": "B2C_1_ProfileEdit"
},
Added the services in ConfigureServices..
services.AddAuthentication(AzureADB2CDefaults.AuthenticationScheme)
.AddAzureADB2C(options => Configuration.Bind("AzureAdB2C", options));
and added Auth in Configure
app.UseAuthentication();
app.UseAuthorization();
For a moment, I see my app shooting over to azure for authentication, but then I get redirected back to https://localhost:xxxx/signin-oidc, with a ERR_CONNECTION_CLOSED
I've missed something somewhere.