Skip to content

Commit

Permalink
Merge pull request #99 from timisbusy/master
Browse files Browse the repository at this point in the history
Document accessType and approvalPrompt options
  • Loading branch information
jaredhanson committed Feb 3, 2016
2 parents 61e43b1 + e6adabc commit 88f33f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Expand Up @@ -108,6 +108,13 @@ app.get('/auth/google/callback',
});
```

You may notice that the refresh token comes back undefined on non-initial authentication attempts. To force an approval prompt and get back a refresh token with every call, add the params `accessType` and `approvalPrompt` to your `passport.authenticate()` call. For example:

```Javascript
app.get('/auth/google',
passport.authenticate('google', { scope: 'https://www.googleapis.com/auth/plus.login', accessType: "offline", approvalPrompt: "force" }));
```

## Examples

For a complete, working example, refer to the [OAuth 1.0 example](https://github.com/jaredhanson/passport-google-oauth/tree/master/examples/oauth)
Expand Down

0 comments on commit 88f33f5

Please sign in to comment.