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

로그인시 계속 session에 location이 반영이 안되는 문제 발생 #154

Open
SeungJL opened this issue Jun 4, 2024 · 0 comments

Comments

@SeungJL
Copy link
Collaborator

SeungJL commented Jun 4, 2024

문제 요약: session의 location을 통해 많은걸 판단하는데, 최근 유저들의 경우 가입할때 삽입돼서 상관없었지만, 더 초기 유저라 location이 없었을 때 session이 만들어진 경우 업데이트가 되지 않고 있었음.

문제 해결

signin에서는 DB와 연결해 저장된 user을 가져오는데, return true과 되면 여기서의 account 는 jwt에서의 account로 연결됨. jwt에서 return되는 netToken은 session 에서의 token이 되고, 이 token을 통해 session의 값을 업데이트 함. 때문에, signin에서 account의 location을 user로 업데이트 해 주고, token에서는 account를 기준으로 account.location을 반환해주면 됨.

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

No branches or pull requests

1 participant