Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 830 Bytes

readme.md

File metadata and controls

38 lines (28 loc) · 830 Bytes

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);
});