Skip to content

Passport Strategy for authenticating with Nest via OAuth2

License

Notifications You must be signed in to change notification settings

vinayps/passport-nest

Repository files navigation

Passport Nest Strategy

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.

Install

npm install passport-nest

Example

See examples/ for a complete working example.

Usage

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

Contributing

Contributions are always welcome and highly encouraged.

See CONTRIBUTING for more information on how to get started.

License

Apache 2.0 - See LICENSE for more information.

About

Passport Strategy for authenticating with Nest via OAuth2

Resources

License

Stars

Watchers

Forks

Packages

No packages published