active-directory-b2c-dotnetcore-webapp | NET Core web application that can sign in a user | Azure library
kandi X-RAY | active-directory-b2c-dotnetcore-webapp Summary
kandi X-RAY | active-directory-b2c-dotnetcore-webapp Summary
An ASP.NET Core web application that can sign in a user using Azure AD B2C, get an access token using MSAL.NET and call an API.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of active-directory-b2c-dotnetcore-webapp
active-directory-b2c-dotnetcore-webapp Key Features
active-directory-b2c-dotnetcore-webapp Examples and Code Snippets
Community Discussions
Trending Discussions on active-directory-b2c-dotnetcore-webapp
QUESTION
Could anyone provide some insight or new links on using Azure B2C with MVC, .NET Core 3.1. Most examples are based on Core 2.2
However, it seems more than a few things are done differently with 3.1.
The error I encounter in 2.2 is:
...System.ArgumentNullException: Value cannot be null. (Parameter 'uriString') at System.Uri..ctor(String uriString) at Microsoft.AspNetCore.Authentication.AzureADB2C.UI.AzureADB2COpenIdConnectOptionsConfiguration.BuildAuthority(AzureADB2COptions AzureADB2COptions) at Microsoft.AspNetCore.Authentication.AzureADB2C.UI.AzureADB2COpenIdConnectOptionsConfiguration.Configure(String name, OpenIdConnectOptions options) at Microsoft.Extensions.Options.OptionsFactory
1.Create(String name) at Microsoft.Extensions.Options.OptionsMonitor
1.<>c__DisplayClass11_0.b__0() at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy
1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue() at System.Lazy
1.get_Value() at Microsoft.Extensions.Options.OptionsCache1.GetOrAdd(String name, Func
1 createOptions) at Microsoft.Extensions.Options.OptionsMonitor1.Get(String name) at Microsoft.AspNetCore.Authentication.AuthenticationHandler
1.InitializeAsync(AuthenticationScheme scheme, HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider.GetHandlerAsync(HttpContext context, String authenticationScheme) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
ANSWER
Answered 2020-Apr-07 at 02:20If you want to configure Azure AD B2C auth for your .net core application, you can use sdk Microsoft.AspNetCore.Authentication.AzureADB2C.UI
. But please note that you need to choose the right sdk version according to the .net core version you use. For example, if you use .net core 2.2, the sdk version should be 2.2.0.
The detailed steps are as below
Implement Azure AD B2C auth in web application
a. add the following settings in the appsettings.json
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install active-directory-b2c-dotnetcore-webapp
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page