我正在嘗試設置用戶註冊的功能。註冊表單使用Redux表單,身份驗證由passport.js處理,我爲我的用戶數據庫使用mongoDB(mLab)。 當我嘗試註冊新用戶,我得到以下錯誤: POST http://localhost:3000/signup 404 (Not Found)
Uncaught (in promise) Error: Request failed with status
我有一個Express服務器,我正在使用Passport-local進行身份驗證。我有以下受保護的路線: app.post("/api/test", connect.ensureLoggedIn("/"), (req, res) => {
let test = new Test(req.body);
test
.save()
.then(data => {
re
我正在使用passport,express-session和connect-pg-simple。 問題是,會話不正確地從存儲獲得,它正確地(我希望,但懷疑)得到保存。 我的設置與我在許多教程中找到的相同。 server.js: import express from 'express';
import next from 'next';
import bodyParser from 'body
當使用passport-local和sequelize for MySQL進行用戶認證時,我遇到了belo提到的錯誤。當運行服務器時,它正在SQL中創建新表(如果尚未創建),但只要我點擊註冊按鈕,就會顯示錯誤。 錯誤: TypeError: Cannot read property 'findOne' of undefined
at Strategy._verify (E:\Web De