0

Frustrated!

I've can get Sign In and Sign Up to work with UI customizations and API connector integrated to a JavaScript SPA, using the latest Microsoft Authentication Library for JavaScript (MSAL.js) 2.0 for Browser-Based Single-Page Applications, version 2.28.1 and OAuth 2.0 Authorization code flow (with PKCE).

Sign In works. Sign In, then click "Don't have an account? Sign up now" and Sign Up works.

What I can't do, is get directly to Sign Up to work. I'm utilizing User Flow, and soo close to getting past this hurdle and finishing up with the migration.

When I pass in prompt="create" to the loginRequest, I get is "create" is not an allowed option, but it's in the MSAL documentation in one place, but in another it states that only "login" is allowed. Bu there's GOT to be a way to load the Sign Up page first and NOT have to go through the Sign In page. https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_browser.html#popuprequest e.g. error returned: error=invalid_request&error_description=AADB2C90043%3a+The+prompt+included+in+the+request+contains+invalid+values.+Expected+%27none%27%2c+%27login%27%2c+%27consent%27+or+%27select_account%27.

Other docs I found state I have to Enable guest self-service sign up via user flows... When I go to the AAD B2C tenant, this screen doesn't look like the one that is available, so the docs are old because everything changes so often: https://learn.microsoft.com/en-us/azure/active-directory/external-identities/self-service-sign-up-user-flow

I tried doing another route, and setup a Sign Up only user flow. When it returns back to my app, it returns nothing. The User is created, but NOT signed in. There's pre-request values stored in the sessionStorage. But nothing to tell me if it worked or failed, just nothing. But, if the user clicks on Login, then it auto logs them in and then bounces back and the user is fully logged in.

And there was this: https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/FAQ.md#how-do-i-implement-self-service-sign-up which at the end states "Please note that that self-service sign-up is not available in B2C and test environments." What?!? So is what I am trying to do NOT supported? Makes no sense why not. What's the point of offering B2C if a user can't Sign Up????

Any help is greatly appreciated, thank you! Rob Bramhall

0 Answers0