You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+17-9Lines changed: 17 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ From your shell or command line:
42
42
```bash
43
43
cd active-directory-b2c-javascript-msal-singlepageapp
44
44
npm install && npm update
45
-
node server.js
45
+
npm start
46
46
```
47
47
48
48
The console window shows the port number for the web application
@@ -139,12 +139,14 @@ Provide the following values for the Single Page Application registration:
139
139
140
140
Now in the sample code, you can replace the single-page application's demo environment configuration with your own tenant.
141
141
142
-
1. Open the `authConfig.js` file.
143
-
2. Find the assignment for `clientID` and replace the value with the Application ID for the single page application you registered in Step 4, for example the Application ID found in `My Test SPA` application in the Azure portal.
144
-
3. Find the assignment for `authority` and replacing `b2c_1_susi` with the name of the policy you created in Step 2, and `fabrikamb2c.onmicrosoft.com` by the name of your Azure AD B2C tenant, for example `https://<your-tenant-name>.b2clogin.com/<your-tenant-name>.onmicrosoft.com/<your-sign-in-sign-up-policy>`
145
-
4. Open the `apiConfig.js` file.
146
-
5. Find the assignment for the scopes `b2cScopes` replacing the URL by the scope URL you created for the Web API, e.g. `b2cScopes: ["https://<your-tenant-name>.onmicrosoft.com/helloapi/demo.read"]`
147
-
6. Find the assignment for API URL `webApi` replacing the current URL by the URL where you deployed your Web API in Step 4, e.g. `webApi: "https://fabrikamb2chello.azurewebsites.net/hello`
142
+
1. Open the `poliConfig.js` file.
143
+
2. In the `b2cPolicies` object, replace the current signUp-signIn policy value with the name of the policy you created in Step 2 (if you have additional policies, you can add them here as well).
144
+
3. Open the `authConfig.js` file.
145
+
4. Find the assignment for `clientID` and replace the value with the Application ID for the single page application you registered in Step 4, for example the Application ID found in `My Test SPA` application in the Azure portal.
146
+
5. Find the assignment for `authority` and replace `fabrikamb2c.onmicrosoft.com` by the name of your Azure AD B2C tenant, for example `https://<your-tenant-name>.b2clogin.com/<your-tenant-name>.onmicrosoft.com/<your-sign-in-sign-up-policy>`
147
+
6. Open the `apiConfig.js` file.
148
+
7. Find the assignment for the scopes `b2cScopes` replacing the URL by the scope URL you created for the Web API, e.g. `b2cScopes: ["https://<your-tenant-name>.onmicrosoft.com/helloapi/demo.read"]`
149
+
8. Find the assignment for API URL `webApi` replacing the current URL by the URL where you deployed your Web API in Step 4, e.g. `webApi: "https://fabrikamb2chello.azurewebsites.net/hello`
148
150
149
151
Your resulting code should look as follows:
150
152
@@ -167,8 +169,8 @@ const tokenRequest = {
167
169
```javascript
168
170
constmsalConfig= {
169
171
auth: {
170
-
clientId:"e760cab2-b9a1-4c0d-86fb-ff7084abd902",//This is your client ID
171
-
authority:"https://fabrikamb2c.b2clogin.com/fabrikamb2c.onmicrosoft.com/b2c_1_susi", //This is your tenant info
0 commit comments