Strategy to authenticate with Nest via OAuth2 in Passport
Get your API key at the Nest Developer Portal.
For more details, read the Nest authorization documentation.
npm install passport-nest
See examples/
for a complete working example.
Assuming an express app:
passport.use(new NestStrategy({
clientID: NEST_ID,
clientSecret: NEST_SECRET
}));
app.get('/auth/nest', passport.authenticate('nest'));
app.get('/auth/nest/callback', passport.authenticate('nest', {}),
function(req, res) {
// token is in req.user.accessToken
});
Contributions are always welcome and highly encouraged.
See CONTRIBUTING for more information on how to get started.
Apache 2.0 - See LICENSE for more information.