Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #299

Merged
merged 4 commits into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -33,6 +34,23 @@ 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 when using WebAppStrategy.

Old Usage (SDK v6):
```
app.use(passport.authenticate(WebAppStrategy.STRATEGY_NAME));
app.get(CALLBACK_URL, passport.authenticate(WebAppStrategy.STRATEGY_NAME));
```
New Usage (SDK v7):
In SDK version 7, when using webappStrategy, you need to pass { keepSessionInfo: true } to the passport.authenticate method. Update your code as follows:

```
app.use(passport.authenticate(WebAppStrategy.STRATEGY_NAME, { keepSessionInfo: true }));
app.get(CALLBACK_URL, passport.authenticate(WebAppStrategy.STRATEGY_NAME, { keepSessionInfo: true }));
```

## Installation
```
Expand Down
Loading