From e0939ac039d79bc89447d22bdbeab52bcedc0d5d Mon Sep 17 00:00:00 2001 From: Julius Breckel Date: Wed, 17 May 2017 13:21:42 +0200 Subject: [PATCH] Add note about params argument to verify --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index b996c3b..03f6fe4 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,16 @@ passport.use(new OAuth2Strategy({ )); ``` +Additionally `oauth2` can return the whole result of the oauth2 request (excluding `refresh_token`) as a 3rd argument to verify. +```js +function(accessToken, refreshToken, additionalParams, profile, cb) { + User.findOrCreate({ exampleId: profile.id }, function (err, user) { + return cb(err, user); + }); +} +``` + + #### Authenticate Requests Use `passport.authenticate()`, specifying the `'oauth2'` strategy, to