Skip to content

Commit

Permalink
Merge pull request jaredhanson#68 from jacob-israel-turner/patch-1
Browse files Browse the repository at this point in the history
OAuth 2.0 Scope
  • Loading branch information
jaredhanson committed Mar 6, 2015
2 parents 1b6d65b + 2178253 commit 21e19b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ passport.use(new GoogleStrategy({
Use `passport.authenticate()`, specifying the `'google'` strategy, to
authenticate requests.

Authentication with Google requires an extra scope parameter. For information, go [here](https://developers.google.com/accounts/docs/OpenIDConnect#scope-param).

For example, as route middleware in an [Express](http://expressjs.com/)
application:

Expand Down Expand Up @@ -89,13 +91,14 @@ passport.use(new GoogleStrategy({

Use `passport.authenticate()`, specifying the `'google'` strategy, to
authenticate requests.
Authentication with Google requires an extra scope parameter. For information, go [here](https://developers.google.com/accounts/docs/OpenIDConnect#scope-param).

For example, as route middleware in an [Express](http://expressjs.com/)
application:

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

app.get('/auth/google/callback',
passport.authenticate('google', { failureRedirect: '/login' }),
Expand Down

0 comments on commit 21e19b8

Please sign in to comment.