2

我的平均堆栈网站上有一个登录页面。该网站使用html5mode,并有<base href="/1/" />。登录使用Passport.js,例如:

router.get('/' + process.env.versionNumber + '/auth/google', passport.authenticate('google', { scope: ['https://www.googleapis.com/auth/userinfo.profile',
        'https://www.googleapis.com/auth/userinfo.email'] }));
router.get('/' + process.env.versionNumber + '/auth/google/callback', passport.authenticate('google', {
        successRedirect: '/' + process.env.versionNumber + '/dashboard',
        failureRedirect : '/' + process.env.versionNumber + '/login',
        failureFlash : true
    }))

对于 Twitter、GitHub 和 Linkedin,它都重定向到https://localhost:3000/1/dashboard. 但是,Google 重定向到https://localhost:3000/1/dashboard#,Facebook 重定向到https://localhost:3000/1/dashboard#_=_.

有谁知道发生了什么?

4

0 回答 0