Authored by lijing

微信认证页,不允许分享

... ... @@ -22,6 +22,10 @@ const Sources = {
const bind = {
indexPage: (req, res) => {
// 如果没有//m.yohobuy.com,判定为非法链接
if (req.session.originalUrl !== 'true') {
res.redirect('//m.yohobuy.com');
}
let refer = req.get('Referer');
if (refer) {
... ...
... ... @@ -267,6 +267,8 @@ const local = {
const wechat = {
login: (req, res, next) => {
// 设置为原链接标识originalUrl
req.session.originalUrl = 'true';
req.session.authState = uuid.v4();
return passport.authenticate('weixin', {
state: req.session.authState
... ...