Skip to content

A simple implementation of Google and Facebook Oauth with node, express4, passportjs and mongodb

Notifications You must be signed in to change notification settings

marcorm/node-express-passport_oauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-express-passport_oauth

A simple implementation of Google and Facebook Oauth with node, express4, passportjs and mongodb (mongoose)

Installation

To try this project on you local machine you must set some environment variables:

Env Variable Value
NEP_FACEBOOK_CLIENT_ID your FB client id
NEP_FACEBOOK_CLIENT_SECRET your FB client secret
NEP_FACEBOOK_CALLBACK {your_address:port}/auth/facebook/callback
NEP_GOOGLE_CLIENT_ID your Google client id
NEP_GOOGLE_CLIENT_SECRET your Google secret
NEP_GOOGLE_CALLBACK {your_address:port}/auth/google/callback
NEP_MONGOLAB_URI mongodb://{dbuser}:{dbpassword}@{dbaddress}:{dbport}/{dbname}

Getting started

npm install
npm start

visit http://localhost:3000 in you browser

Google and Facebook apps (required)

To create an app on Facebook go to: https://developers.facebook.com/apps/
To create an app on Google go to: https://console.developers.google.com/project

MongoDB URI (required)

I use mongolab for my mongodb instance. It's a great service, easy to use. https://mongolab.com/
You can use what you want, either a local instance of mongodb.

Demo

https://node-express-passport.herokuapp.com/

Roadmap

  • add roles with connect-roles

About

A simple implementation of Google and Facebook Oauth with node, express4, passportjs and mongodb

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published