Skip to content
Snippets Groups Projects
Commit e55e7a77 authored by tpgus2603's avatar tpgus2603
Browse files

프론트에서 생기는 로그인 오류 수정

parent 1e9d9192
No related branches found
No related tags found
1 merge request!42[#25] 배포코드 master브랜치로 이동
......@@ -25,21 +25,27 @@ app.use(
credentials: true,
})
);
// 미들웨어 설정
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
// 세션 설정
//
app.use(
session({
secret: 'your_session_secret',
secret: 'your-secret-key',
resave: false,
saveUninitialized: false,
rolling: true,
cookie: {
httpOnly: true,
secure: false,
maxAge: 60 * 60 * 1000, // 1시간
sameSite: 'lax',
},
})
);
// 미들웨어 설정
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
// Passport 초기화 및 세션 연결
app.use(passport.initialize());
app.use(passport.session());
......
......@@ -4,7 +4,7 @@ const { User } = require('../models');
class friendController {
/**
* 친구 요청 보내기
* 클라이언트는 userId와 요청을 보낼 사용자의 email을 전송
* 클라이언트는 userId와 요청을 보낼 사용자의 email을 body에전송
*/
async sendFriendRequest(req, res, next) {
const { userId, email } = req.body;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment