草庐IT

authenticatedOrNot

全部标签

node.js - Node - Passport Auth - Authed Post Route 在表单提交时挂起

这是一个奇怪的问题。ImPassport的“本地策略”适用于我的express应用程序,但我遇到了一个奇怪的问题。基本上,我有3条路线。每个都有一个身份验证检查。app.get('/admin',authenticatedOrNot,adminRoute.index);app.get('/admin/new',authenticatedOrNot,adminRoute.newpost);app.post('/admin/new',authenticatedOrNot,adminRoute.create);authenticatedOrNot方法很简单:varauthenticatedO

node.js - Node - Passport Auth - Authed Post Route 在表单提交时挂起

这是一个奇怪的问题。ImPassport的“本地策略”适用于我的express应用程序,但我遇到了一个奇怪的问题。基本上,我有3条路线。每个都有一个身份验证检查。app.get('/admin',authenticatedOrNot,adminRoute.index);app.get('/admin/new',authenticatedOrNot,adminRoute.newpost);app.post('/admin/new',authenticatedOrNot,adminRoute.create);authenticatedOrNot方法很简单:varauthenticatedO