新手反应问题:我\xe2\x80\x99m 将其与passport.js 和express 一起使用。I\xe2\x80\x99m 成功登录应用程序。但我不知道如何进行重定向。
\n\nrouter.post('/login',\n passport.authenticate('local'),\n function(req, res) {\n // If this function gets called, authentication was successful.\n res.redirect('/upload'); //<\xe2\x80\x94\xe2\x80\x94 what I\xe2\x80\x99d like to do is some kind of redirect here\n});\nRun Code Online (Sandbox Code Playgroud)\n\n任何帮助表示赞赏。
\n