Skip to content

Commit 2fe1825

Browse files
committed
Fix signout function
1 parent e2c2bd5 commit 2fe1825

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

demo/graph-tutorial/routes/auth.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ router.get('/callback',
6565
// </CallbackSnippet>
6666

6767
router.get('/signout',
68-
function(req, res) {
68+
async function(req, res) {
6969
// Sign out
7070
if (req.session.userId) {
7171
// Look up the user's account in the cache
72-
const accounts = req.app.locals.msalClient
72+
const accounts = await req.app.locals.msalClient
7373
.getTokenCache()
7474
.getAllAccounts();
7575

tutorial/04-add-aad-auth.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ In this exercise you will extend the application from the previous exercise to s
8484
);
8585
8686
router.get('/signout',
87-
function(req, res) {
87+
async function(req, res) {
8888
// Sign out
8989
if (req.session.userId) {
9090
// Look up the user's account in the cache
91-
const accounts = req.app.locals.msalClient
91+
const accounts = await req.app.locals.msalClient
9292
.getTokenCache()
9393
.getAllAccounts();
9494

0 commit comments

Comments
 (0)