Base solution for your next web application

Activities of "konverto"

I'm trying to enable Azure B2C login for our application.

The aspnetzero version i'm using is:

  • aspnetcore + angular 7, v6.9

I've followed the instructions in this post (https://support.aspnetzero.com/QA/Questions/6525) and modified the authConfigurer accordingly.

The problem I'm running into is that I'm having trouble setting the LoginUrl for appsettings.json. I've tried several variants of LoginUrl, but I didnt get any to work.

I'd like the user to be taken to this page: https://mytenant.b2clogin.com/mytenant.onmicrosoft.com/b2c_1_signAndLogin/oauth2/v2.0/authorize?client_id=xxx&redirect_uri=https://localhost:4200/signin-oidc&response_type=id_token&scope=openid%20profile&response_mode=form_post so existing users can login and new users can signup.

But when i use the above link (which does what we need the login / signin flow to do) as "LoginUrl" it doesn't work, because the auth node_module adds its own parameters, which lead to an error when opening the link.

Aspnetzero support suggested using this as loginUrl: https://login.microsoftonline.com/94305afd-972f-4b71-810f-15bd41ab235e/oauth2/authorize But when I use this, the user is directly taken to a login form, without any possibility to create a new profile, which is crucial for our project.

Did anyone deal with a similar use-case and could provide some help / hint on this?

Thank you very much in advance.

Question

Good morning,

I'm currently setting up my project, following these instructions: https://docs.aspnetzero.com/documents/aspnet-core-angular/latest/Getting-Started-Angular-Merged

I've created the db, run the project and went to the login mask. As Tenant name I use "Default", with the default admin user login data, provided in the code / demo db.

But as I try to login I'm getting an error:

  • xPortalMergedDemo.Web.Controllers.UiController.GetLoginResultAsync(string usernameOrEmailAddress, string password, string tenancyName) in UiController.cs throw _abpLoginResultTypeHelper.CreateExceptionForFailedLoginAttempt(loginResult.Result, usernameOrEmailAddress, tenancyName);

  • xPortalMergedDemo.Web.Controllers.UiController.Login(LoginModel model) in UiController.cs var loginResult = await GetLoginResultAsync(model.UserNameOrEmailAddress, model.Password, model.TenancyName); Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor+TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, object controller, object[] arguments)

What am I missing here? Any hint is appreciated!!!

Thanks very much in advance, Kind regards Vicky Pallaoro

Showing 1 to 2 of 2 entries