Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: login and logout #15

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

feat: login and logout #15

wants to merge 2 commits into from

Conversation

rlooo
Copy link

@rlooo rlooo commented Nov 18, 2024

No description provided.

@laggu
Copy link
Member

laggu commented Nov 18, 2024

한번에 너무 큰 수정이 올라온거 같은데 나눠서 올려주실수 있을까요?

@laggu
Copy link
Member

laggu commented Nov 18, 2024

생각해보니 login 을 native 에서 진행하면 passport 가 필요 없을수도 있을것 같아요
login 진행 방식 논의 완료 하고 수정 진행하시면 될것같습니다

Copy link
Member

@joonamin joonamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제가 잘 이해를 못한 것인지..
oauth2 에서 세션을 이용해야하는 이유를 알 지 못하겠습니다.
각각의 서비스들에서는 세션과 jwt를 혼용하여 사용하고 있구요..
명확하게 의도를 설명해주실 수 있으신가요?

// TODO: add verify user middleware
router.post('/', async (req: Request, res: Response) => {
export const createEnquiry = async (req: Request, res: Response) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분은 왜 수정하신걸까요?

import { findUserById } from '@/services/v1/user'

export default function configurePassport(passport: PassportStatic): void {
passport.serializeUser((user: User, done) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

세션을 로그인 과정에서 어떻게 이용하시나요?
oauth 로그인 이후에, jwt 를 기준으로 저희만의 jwt로 sign 해서 클라이언트에게 전달하는 로직으로 확인해서요..!

}

export const logout = (req: Request, res: Response) => {
req.logout()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

의도하신 로그아웃 기능이 사용자 정보를 저장한 세션을 만료시키는 것이 맞을까요?

@joonamin
Copy link
Member

joonamin commented Dec 9, 2024

@rlooo 해당 PR은 close 처리해주실 수 있으신가요?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants