1.2.0 • Published 8 years ago

passport-streamme-oauth2 v1.2.0

Weekly downloads
13
License
-
Repository
github
Last release
8 years ago

StreamMe Passport Strategy

Alpha

Currently oauth clients are in alpha. Please contact support@stream.me staff for an oauth client

Installation

$ npm install passport-streamme-oauth2

Usage

passport.use(
	new StreamMeStrategy({
		clientID: streammeClientId,
		clientSecret: streammeClientSecret,
		callbackURL: 'http://localhost/redirect'
	}, function(accessToken, refreshToken, profile, done) {

		// Save your user and accessToken

		done(null, profile);
	})
);

app.get('/', passport.authenticate('streamme', {
	scope: ['account']
}));

app.get('/redirect', passport.authenticate('streamme', {
	scope: ['account']
}), function(req, res) {
	res.send(req.user);
});