Passport for Coding
$ yarn add passport-coding
passport.use(new Strategy({
appID: {APPID},
name:{可以设置组件的名字}
appSecret: {APPSECRET},
getToken: {getToken},
saveToken: {saveToken}
},
function(accessToken, refreshToken, profile,expires_in, done) {
return done(err,profile);
}
));
The `getToken` and `saveToken` can be provided to initialize Wechat OAuth instance.
router.get("/auth/coding", passport.authenticate("coding", options));
Copyright (c) 2019 adger