We.js google passport authentication
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
files/public
locales
server/controllers
.gitignore
.jscsrc
.jshintignore
.jshintrc
.npmignore
README.md
install.js
package.json
plugin.js

README.md

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',
        // 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