Skip to content

Commit c03d584

Browse files
committed
fix cache issue, add session secret notice
1 parent f9ad662 commit c03d584

7 files changed

Lines changed: 12 additions & 4 deletions

File tree

1-Authentication/1-sign-in/App/utils/cachePlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const fs = require("fs");
2-
const cachePath = './App/data/cache.json' // replace this string with the path to your valid cache file.
2+
const cachePath = './data/cache.json' // replace this string with the path to your valid cache file.
33

44
/**
55
* This implements ICachePlugin for persistent caching. For more information, visit:

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
141141

142142
> :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.
143143
144+
1. Open the `App/app.js` file.
145+
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.
146+
144147
## Running the sample
145148

146149
Locate the root of the sample folder. Then:

1-Authentication/2-sign-in-b2c/App/utils/cachePlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const fs = require("fs");
2-
const cachePath = './App/data/cache.json' // replace this string with the path to your valid cache file.
2+
const cachePath = './data/cache.json' // replace this string with the path to your valid cache file.
33

44
/**
55
* This implements ICachePlugin for persistent caching. For more information, visit:

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
117117

118118
> :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.
119119
120+
1. Open the `App/app.js` file.
121+
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.
122+
120123
## Running the sample
121124

122125
Locate the root of the sample folder. Then:

2-Authorization/1-call-graph/App/utils/cachePlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const fs = require("fs");
2-
const cachePath = './App/data/cache.json' // replace this string with the path to your valid cache file.
2+
const cachePath = './data/cache.json' // replace this string with the path to your valid cache file.
33

44
/**
55
* This implements ICachePlugin for persistent caching. For more information, visit:

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ 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.
159+
158160
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:
159161

160162
```json

3-Deployment/App/utils/cachePlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const fs = require("fs");
2-
const cachePath = './App/data/cache.json' // replace this string with the path to your valid cache file.
2+
const cachePath = './data/cache.json' // replace this string with the path to your valid cache file.
33

44
/**
55
* This implements ICachePlugin for persistent caching. For more information, visit:

0 commit comments

Comments
 (0)