Merge branch 'hotfix/login' into 'grey'
第三方登录bug See merge request !207
Showing
1 changed file
with
6 additions
and
0 deletions
@@ -295,6 +295,8 @@ const wechat = { | @@ -295,6 +295,8 @@ const wechat = { | ||
295 | 295 | ||
296 | const sina = { | 296 | const sina = { |
297 | login: (req, res, next) => { | 297 | login: (req, res, next) => { |
298 | + // 设置为原链接标识originalUrl | ||
299 | + req.session.originalUrl = 'true'; | ||
298 | req.session.authState = uuid.v4(); | 300 | req.session.authState = uuid.v4(); |
299 | return passport.authenticate('sina', { | 301 | return passport.authenticate('sina', { |
300 | state: req.session.authState | 302 | state: req.session.authState |
@@ -321,6 +323,8 @@ const sina = { | @@ -321,6 +323,8 @@ const sina = { | ||
321 | 323 | ||
322 | const qq = { | 324 | const qq = { |
323 | login: (req, res, next) => { | 325 | login: (req, res, next) => { |
326 | + // 设置为原链接标识originalUrl | ||
327 | + req.session.originalUrl = 'true'; | ||
324 | req.session.authState = uuid.v4(); | 328 | req.session.authState = uuid.v4(); |
325 | return passport.authenticate('qq', { | 329 | return passport.authenticate('qq', { |
326 | state: req.session.authState | 330 | state: req.session.authState |
@@ -348,6 +352,8 @@ const qq = { | @@ -348,6 +352,8 @@ const qq = { | ||
348 | 352 | ||
349 | const alipay = { | 353 | const alipay = { |
350 | login: (req, res, next) => { | 354 | login: (req, res, next) => { |
355 | + // 设置为原链接标识originalUrl | ||
356 | + req.session.originalUrl = 'true'; | ||
351 | return passport.authenticate('alipay')(req, res, next); | 357 | return passport.authenticate('alipay')(req, res, next); |
352 | }, | 358 | }, |
353 | callback: (req, res, next) => { | 359 | callback: (req, res, next) => { |
-
Please register or login to post a comment