Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Ask Question
I am developing react js application and will be using azure adb2c for security (
reference
). To enable javascript in userflows, it seems I have to change redirect url to
b2clogin.com
. I have referred this
https://learn.microsoft.com/en-us/azure/active-directory-b2c/b2clogin
, but not clear on this point:
Set your Azure AD B2C application to use b2clogin.com for user flow references and token endpoints.
Can someone explain more on this? I have asked for any video reference in that page as well, waiting for their reply. I am not getting where to Change redirect URLs and where to Update in my application.
Question: I am not getting where to Change redirect URLs and where to Update in my B2C application?
Step: 1: Search B2C
According to your case you have to your B2C tenant first. To do that, go to azure portal. Click on
All services
, in
search everything
box type B2C then click on B2C Icon as shown below picture. See the screen shot below:
Step: 2: Go To B2C Application
Once you click on B2C icon you will be shown application on left tab menu, click on that and select your application you want to configure. See the screen shot below:
Step: 3: Select your Application
Select your
application
from application list for configuration. See the image below:
Step: 4: Configure Reply URL
Soon you select the application you want to configure you will see the
Reply URL
below the page as specified on following screen shot.
Add or configure your
Reply URL
as you want. You can add many
Reply URL
as per your need.
Question: Set your Azure AD B2C application to use b2clogin.com for user flow?
To configure
b2clogin.com
domain on your
user flow
please follow the steps below:
Step: 1: User flows (policies)
Go to your B2C application domain you will see
User flows (policies)
menu under policies section. See the below screen shot:
Step: 2: New User Flow / Existing From List
If you have existing
user flow
you can pick from the list or you can create new user flow by selecting `New User Flow' on top. See the Picture below:
Step: 3: Type A Flow Name
Type a name for your flow as I have specified in screen shot. Have look on below:
Step: 4: Page layouts For b2clogin.com User Flow
Once the new flow created in your case
B2C_1_Test_Flow
. Click on that from the flow list. You will see
Page layouts
menu on left menu bar. Click on
Page layouts
. If you want to set
custom page url
then click
Yes
to
Use custom page content
then
Custom page URI
would be enable for customization. See the Image below .
This is how you could customize your B2C
Reply URL
and
Custom Page URL
. If you have any more concern feel free to share here in comment. Happy coding!
–
–
–
–
Thanks all, I have resolved my problem. Used the latest library of b2c from
https://github.com/leszekczajka/msal-b2c-react
and in the initalize method i gave my tenant guid id instead of tenant name and added ValidateAuthority as false like below:
authentication.initialize({
instance: 'https://mytenant.b2clogin.com/',
tenant: 'xxxxxxxxx_tenantGUID__xxxxxxxxxxxx',
signInPolicy: 'B2C_1_signupsigninv2',
resetPolicy: 'B2C_1_pwdresetv2',
applicationId: 'xxxxxxxxxxxxxx',
cacheLocation: 'sessionStorage',
scopes: ['https://mytenant.onmicrosoft.com/newsite/user_impersonation'],
validateAuthority: false,
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.