-
Notifications
You must be signed in to change notification settings - Fork 28
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
[PR] oauth와 토큰, 회원가입과 쿠키 초기작업 / Store, View 분리 #109
Conversation
jsonwebtoken 모듈을 추가함.
client의 회원가입 폼에 패스워드를 입력받는 부분을 삭제함.
다른 피처에 정의되어있는 기능을 가져오면서 에러가 났던 부분을 재작성함.
유저 모델을 접근할 수 있는 메소드를 서비스에 추가함.
컨벤션 변경으로 인한 controllers를 .으로 연결됨.
모든 모델을 서비스 index에서 뽑아서 쓰기로 했음.
패스포트가 DB 실 데이터를 비교하여 토큰을 발급할 수 있는 로직을 가지고 있다.
사용되지 않는 패스워드에 관련된 데이터를 삭제함
Token을 발급하는 함수를 제작
토큰을 검증하는 엔드포인트를 하나 만듦
쿠키를 할당하는 기능을 익스프레스 기본 기능으로 변경함
dd2f3b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
몇가지 수정해주시고 merge하시면 될 것 같습니다! 인터페이스 예술이네요 ^^
alert('이미 가입되어있는 회원입니다.'); | ||
history.push('/'); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로직을 분리하면 좋을것같음
required: true, | ||
}, | ||
}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plcaeholder들도 상수처리하면 좋을것같음
*/ | ||
export interface ActionParams<T> { | ||
type: keyof T; | ||
value: T[keyof T]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
예술이네요 🖼
res.status(400).send({ message: 'Cannot Signup' }); | ||
} | ||
} else { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
빈 else ??
0da6340
관련 이슈
#12 #19 #17 #64
Store와 View의 분리
변경 사항 및 이유
회원가입과 로그인이 가능하도록 설계를 함. 에러처리가 현재 되어있지 않고, 순수하게 성공로직만 작성되어있으나, Store와 View의 구조를 보여드리기 위해 1차로 PR을 날림.
PR Point
Store와 View가 분리된 것 과 controller에 대해 잘 된것인지 확인을 부탁드립니다.
참고 사항
머지 이후에 브랜치 지우지 말아주세요.