node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



Restberry Passport wrapper for passport-google-oauth.


npm install restberry-passport-google


var restberryPassport = require('restberry-passport');
var auth = restberryPassport.config(function(auth) {
.use('google', {
    clientID: ...,
    clientSecret: ...,
    callbackHost: ...,
    returnURL: ...,
    scope: ...,

Two new routes have been created to the User:

  • GET /login/google
  • GET /login/google/callback

Run the tests

The tests require you to have the node test app running on port 6000 and the the index.html test file accessable at port 6001 on your localhost. There is an nginx-conf file that is setup for this in the test directory. Then simply run:

npm test

Setup Google App

You can setup your own Google app at, under APIs & auth and then credentials.