마이페이지와 사용자의 로그인 상태 유지에 대해 #253
Replies: 4 comments 4 replies
-
마이페이지 클릭 시에 로그인 하지 않은 상태에서 사용자에게 제공하는 정보가 없다면 골치아프겠군요... 추가적인 의견을 덧붙이자면 모든 API에서 401 에러가 발생하는 것을 핸들링 하는 것도 좋지만 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
저도 위 두분 의견과 동일합니다 !
|
Beta Was this translation helpful? Give feedback.
-
저도 해당 api 추가하는 것 좋습니다! |
Beta Was this translation helpful? Give feedback.
-
안건
me
API를 도입해야하나?금일(8월 11일) 아침에
me
API를 도입하지 않고 마이페이지 클릭 시에 로그인 하지 않은 상태라면 로그인 페에지로, 그게 아니라면 마이페이지로 이동하기로 했습니다. 하지만 곰곰이 생각을 해보니 '마이페이지에서 로그인 하지 않은 상태 는 어떻게 구분할까?' 하는 의문이 생겼습니다.마이 페이지에 들어갔을 때 그 어떠한 API도 호출하지 않기 때문에 현재 세션이 유효한지 아닌지 알 수 없습니다. 따라서, 마이페이지에 들어왔을 때 사용자 정보를 요청하는 API를 만든다면, 해당 문제는 잠시나마 해결이 가능합니다.
하지만 또다시 비슷한 문제를 마주 했을 때 다른 API를 요청하는 방식으로 문제를 해결할 수 있을것 같지는 않습니다. 따라서 현재 사용자의 세션 유효성을 확인하는
me
API가 필요하다고 생각하는데, 다른 팀원들의 생각은 어떤지 궁금합니다.만약에
me
API가 생긴다면 마이페이지에 들어왔을 때 사용자 정보 요청 API를 따로 만들지 않아도 됩니다. 아마 추가적으로 client에서도 사용자의 로그인 여부를 나타내는 변수를 만들어서 관리할 것 같습니다.Beta Was this translation helpful? Give feedback.
All reactions