0.0.4 • Published 11 years ago

diggerpassport v0.0.4

Weekly downloads
3
License
-
Repository
github
Last release
11 years ago

DiggerPassport

A library to mount multiple passport OAuth handlers onto a diggerexpress app.

var DiggerPassport = require('diggerpassport');
var DiggerExpress = require('diggerexpress');

var app = DiggerExpress();


DiggerPassport(app, {
	// used for namespacing
	id:'appid',

	// where to mount the routes onto the express app
	mountpath:'/auth',

	// if defined we will save the user session in redis
	redis:{
		port:6379,
		hostname:'127.0.0.1'
	},

	// if defined we will look after saving/loading users to the given digger supplychain
	supplychain:userdb,

	// the routes for HTTP redirection
	httproutes:{
		success:'/',
		failure:'/?loginmessage=incorrect details'
	},

	// what providers we want to use
	providers:{
		local:{
		},
		facebook:{
			key:'...',
			secret:'...'
		},
		twitter:{
			key:'...',
			secret:'...'
		}
	}
})

// setup the rest of the app here

##License

MIT