小编Pol*_*ist的帖子

为什么我的Passport auth功能在路由中调用时没有执行?

我正在使用Passport来保护MEAN堆栈应用程序的前端和后端.该应用程序的结构如下:

monstermash
    config // server configuration
    public // static directory that will serve the entire Angular frontend
    app
        index.js // initialization of the server
        models 
            index.js // mongoose schemas and models
        passport 
            index.js // configuration for passport and all my strategies
        routes 
            index.js // basic route definitions for the API (using functions defined under v1, below) and UI (routes defined inline here for simplicity's sake)
                v1
                    index.js // all the functions called to power the API routes
Run Code Online (Sandbox Code Playgroud)

这是app/index.js因为我知道有时候需要以正确的顺序调用应用程序中间件: …

node.js express passport-local passport.js

4
推荐指数
1
解决办法
750
查看次数

标签 统计

express ×1

node.js ×1

passport-local ×1

passport.js ×1