passport-dingtalk2
v2.1.1
Published
dingding authentication strategy for Passport.
Downloads
46
Maintainers
Readme
passport-dingtalk2
dingtalk authentication strategy for passport
using the OAuth 2.0 API.
使用OAuth 2.0 API
Installation
$ npm install passport-dingtalk2
Usage
passport.use(new dingtalkStrategy({
clientID: client_id,
clientSecret: client_secret,
callbackURL: "http://127.0.0.1:3000/auth/dingtalk/callback"
},
function(accessToken, refreshToken, profile, done) {
User.findOrCreate({ Id: profile.id }, function (err, user) {
return done(err, user);
});
}
));