1.3.0 • Published 4 years ago

we-plugin-passport-google v1.3.0

Weekly downloads
16
License
MIT
Repository
github
Last release
4 years ago

We.js plugin for add passoport authentication

Plug passport-google-oauth npm module in we.js project with auth urls

How to install

we i we-plugin-passport-google 

How to configure

Passport strategies for authenticating with Google using OAuth 1.0a and OAuth 2.0.

This plugin lets you authenticate using Google in your We.js applications.

The client id and client secret needed to authenticate with Google can be set up from the developer's console Google Developer's Console: https://console.developers.google.com/project .

To configure in your project update the file: config/locals.js :

// ...
  passport: {
    strategies: {
      google: {
        clientID: 'your google api client id',
        clientSecret: 'your google api client secret',
        // scope: [
        //   'profile',
        //   'email',
        //   'https://www.googleapis.com/auth/plus.me',
        //   'https://www.googleapis.com/auth/userinfo.email'
        // ],
        // callbackURL: 'a custom callback url' // optional
      }
    }
  },
// ...

API

Login with google url:

This url will start the authentication.

'get /auth/google': {
  controller    : 'passportGoogle',
  action        : 'page',
  responseType  : 'json'
},

Callback from google url:

'get /auth/google/callback': {
  controller    : 'passportGoogle',
  action        : 'callback',
  responseType  : 'json'
}

Links

License

MIT

1.3.0

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

8 years ago

0.3.0

9 years ago