...
|
...
|
@@ -292,7 +292,7 @@ const wechat = { |
|
|
callback: (req, res, next) => {
|
|
|
if (req.session && req.session.authState && req.session.authState === req.query.state) {
|
|
|
passport.authenticate('weixin', (err, user) => {
|
|
|
if (err) {
|
|
|
if (err || !user) {
|
|
|
log.error(`wechat authenticate error : ${JSON.stringify(err)}`);
|
|
|
return res.redirect(loginPage);
|
|
|
}
|
...
|
...
|
@@ -320,7 +320,7 @@ const sina = { |
|
|
callback: (req, res, next) => {
|
|
|
if (req.session && req.session.authState && req.session.authState === req.query.state) {
|
|
|
passport.authenticate('sina', (err, user) => {
|
|
|
if (err) {
|
|
|
if (err || !user) {
|
|
|
log.error(`sina authenticate error : ${JSON.stringify(err)}`);
|
|
|
return res.redirect(loginPage);
|
|
|
}
|
...
|
...
|
@@ -373,7 +373,7 @@ const alipay = { |
|
|
},
|
|
|
callback: (req, res, next) => {
|
|
|
passport.authenticate('alipay', (err, user) => {
|
|
|
if (err) {
|
|
|
if (err || !user) {
|
|
|
log.error(`alipay authenticate error : ${JSON.stringify(err)}`);
|
|
|
return res.redirect(loginPage);
|
|
|
}
|
...
|
...
|
|