Skip to content

Commit 467616c

Browse files
committed
review changes
1 parent f3641a7 commit 467616c

21 files changed

Lines changed: 25 additions & 1137 deletions

File tree

1-Authentication/1-sign-in/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
139139
1. Find the key `redirectUri` and replace the existing value with the Redirect URI for `msal-node-webapp`. (by default `http://localhost:4000`).
140140
1. Find the key `postLogoutRedirectUri` and replace the existing value with the base address of `msal-node-webapp` (by default `http://localhost:4000`).
141141

142-
> :information_source: For `redirectUri` and `postLogoutRedirectUri`, you can simply enter the path component of the URI instead of the full URI. This may come in handy in deployment scenarios.
142+
> :information_source: For `redirectUri` and `postLogoutRedirectUri`, you can simply enter the path component of the URI instead of the full URI. For example, instead of `http://localhost:4000/redirect`, you can simply enter `/redirect`. This may come in handy in deployment scenarios.
143143
144144
1. Open the `App/app.js` file.
145145
1. Find the string `ENTER_YOUR_SECRET_HERE` and replace it with a secret that will be used when encrypting your app's session using the [express-session](https://www.npmjs.com/package/express-session) package.

1-Authentication/2-sign-in-b2c/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
115115
1. Find the key `postLogoutRedirectUri` and replace the existing value with the base address of `msal-node-webapp` (by default `http://localhost:4000`).
116116
1. Find the key `policies.authorities` abd replace it with the authority strings of your policies/user-flows, e.g. `https://fabrikamb2c.b2clogin.com/fabrikamb2c.onmicrosoft.com/b2c_1_susi`.
117117

118-
> :information_source: For `redirectUri` and `postLogoutRedirectUri`, you can simply enter the path component of the URI instead of the full URI. This may come in handy in deployment scenarios.
118+
> :information_source: For `redirectUri` and `postLogoutRedirectUri`, you can simply enter the path component of the URI instead of the full URI. For example, instead of `http://localhost:4000/redirect`, you can simply enter `/redirect`. This may come in handy in deployment scenarios.
119119
120120
1. Open the `App/app.js` file.
121121
1. Find the string `ENTER_YOUR_SECRET_HERE` and replace it with a secret that will be used when encrypting your app's session using the [express-session](https://www.npmjs.com/package/express-session) package.

2-Authorization/1-call-graph/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ or download and extract the repository .zip file.
6969
Locate the root of the sample folder. Then:
7070

7171
```console
72-
cd 2-Authorization\1-call-graph\App
72+
cd 2-Authorization/1-call-graph/App
7373
npm install
7474
```
7575

@@ -155,7 +155,7 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
155155
1. Find the key `redirectUri` and replace the existing value with the Redirect URI for `msal-node-webapp`. (by default `http://localhost:4000/redirect`).
156156
1. Find the key `postLogoutRedirectUri` and replace the existing value with the base address of `msal-node-webapp` (by default `http://localhost:4000/`).
157157

158-
> :information_source: For `redirectUri` and `postLogoutRedirectUri`, you can simply enter the path component of the URI instead of the full URI. This may come in handy in deployment scenarios.
158+
> :information_source: For `redirectUri` and `postLogoutRedirectUri`, you can simply enter the path component of the URI instead of the full URI. For example, instead of `http://localhost:4000/redirect`, you can simply enter `/redirect`. This may come in handy in deployment scenarios.
159159
160160
The rest of the **key-value** pairs are for resources/APIs that you would like to call. They are set as **default**, but you can modify them as you wish:
161161

3-Deployment/App/app.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,22 @@ app.use(express.static(path.join(__dirname, './public')));
2525

2626
app.use(express.json());
2727

28+
/**
29+
* In App Service, SSL termination happens at the network load balancers, so all HTTPS requests reach your app as unencrypted HTTP requests.
30+
* The line below is needed for getting the correct absolute URL for redirectUri configuration. For more information, visit:
31+
* https://docs.microsoft.com/azure/app-service/configure-language-nodejs?pivots=platform-linux#detect-https-session
32+
*/
33+
app.set('trust proxy', 1);
34+
2835
/**
2936
* Using express-session middleware. Be sure to familiarize yourself with available options
3037
* and set as desired. Visit: https://www.npmjs.com/package/express-session
3138
*/
3239
app.use(session({
3340
secret: 'ENTER_YOUR_SECRET_HERE',
3441
resave: false,
35-
saveUninitialized: false
42+
saveUninitialized: false,
43+
cookie: { secure: true } // only if https connection is used
3644
}));
3745

3846
app.use(router);

3-Deployment/App/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
"ejs": "^3.0.1",
2222
"express": "^4.17.1",
2323
"express-session": "^1.17.1",
24-
"dotenv": "^8.2.0",
25-
"msal-express-wrapper": "file:packages/msal-express-wrapper"
24+
"dotenv": "^8.2.0"
2625
},
2726
"devDependencies": {
2827
"nodemon": "^2.0.2"

3-Deployment/App/packages/msal-express-wrapper/LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

3-Deployment/App/packages/msal-express-wrapper/README.md

Lines changed: 0 additions & 124 deletions
This file was deleted.

3-Deployment/App/packages/msal-express-wrapper/package.json

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)