From 445eed99be4a526b831ca1ba7ac7332f5aede4e4 Mon Sep 17 00:00:00 2001 From: vladimiratanasov <67702437+vladimiratanasov@users.noreply.github.com> Date: Thu, 16 Nov 2023 12:05:06 +0000 Subject: [PATCH] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index fa6986b..c1f1960 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ ## Table of Contents * [Summary](#summary) * [Requirements](#requirements) +* [Migrating from v6 to v7](#migrating-from-v6-to-v7) * [Installation](#installation) * [Example Usage](#example-usage) * [License](#license) @@ -33,6 +34,15 @@ Read the [official documentation](https://console.ng.bluemix.net/docs/services/a ## Requirements * npm 6.+ * node 12.+ +* passport.js 0.6.0+ + +## Migrating from v6 to v7 +Breaking changes in passport.js require users to pass the `{ keepSessionInfo: true }` object to the middleware when protecting endpoints. +``` +app.use(passport.authenticate(WebAppStrategy.STRATEGY_NAME, { keepSessionInfo: true })); + +app.get(CALLBACK_URL, passport.authenticate(WebAppStrategy.STRATEGY_NAME, { keepSessionInfo: true })); +``` ## Installation ```