-
Notifications
You must be signed in to change notification settings - Fork 1
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
token 관리 #12
Comments
|
데이터의 영구성에서 차이가 있다고 생각합니다. 링크 그런데 사용할 때마다 뭔가 비효율적인거 같기도 하고 다른 코드를 참고하더라도 로컬스토리지만 사용하는 코드가 많은 것 같아 |
|
실제로 토큰의 상태 변화 감지를 통해 리다이렉트를 구현 했는데 pathname을 감지하는 방식도 상당히 괜찮은 방법인 것 같습니다. |
보완성의 측면에서 생각하시면 로컬 스토리지의 토큰을 저장한다면 xss 기술의 해킹이 취약하고, 그렇다고 state로 토큰을 관리한다면, 인메모리로 관리하게되니 새로고침시 날라가는 현상이 있을텐데 각자의 장단점의 리소스를 따져서 토큰을 관리하시면 될 것 같습니다. |
제가 현재 서버에서 받아온 토큰을 로컬스토리지에 저장할 뿐만 아니라 상태 관리 라이브러리로 state처럼 사용하고 있는데 이 방식이 괜찮은 방식인지 궁금합니다
The text was updated successfully, but these errors were encountered: