Open Closed

Azure B2C login via OpenId #7129


0
konverto created

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.


1 Answer(s)
  • 0
    ismcagdas created

    Hi @konverto

    We have replied your email. We will try to help you via email, so closing this one.