passport-mail

1.0.1 • Public • Published

passport-mail

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

Install

$ npm install passport-mail

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

Package Sidebar

Install

npm i passport-mail

Weekly Downloads

341

Version

1.0.1

License

MIT

Last publish

Collaborators

  • klyukin