passport-mail-ts
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

passport-mail-ts

Passport strategy for authenticating with Mailru using the OAuth 2.0 API.

Install

$ npm install passport-mail-ts

Usage

passport.use(new MailruStrategy({
    clientID: MAIL_APP_ID,
    clientSecret: MAIL_APP_SECRET,
    callbackURL: "http://localhost:3000/auth/mail/callback"
  },
  function(accessToken, refreshToken, profile, cb) {
    User.findOrCreate({ mailId: profile.id }, function (err, user) {
      return cb(err, user);
    });
  }
));

Credits

Package Sidebar

Install

npm i passport-mail-ts

Weekly Downloads

5

Version

1.0.2

License

MIT

Unpacked Size

23.1 kB

Total Files

12

Last publish

Collaborators

  • n000bak