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

Refresh Token 인터셉트 구현 #49

Open
hansejun opened this issue Jan 27, 2023 · 1 comment
Open

Refresh Token 인터셉트 구현 #49

hansejun opened this issue Jan 27, 2023 · 1 comment
Assignees

Comments

@hansejun
Copy link
Member

hansejun commented Jan 27, 2023

엑세스 토큰이 만료된 상태로 서버에 요청을 보냈을 때 응답에러가 401에 토큰 인증에러가 발생했다면 엑세스 토큰을 재발급하는 요청을 수행하고 재발급 받은 엑세스 토큰으로 실패한 요청을 재실행

[문제사항]
만약 하나의 페이지에서 동시에 여러 요청을 보냈을 때 재발급 요청은 한번만 수행해야 한다.

@hansejun hansejun self-assigned this Jan 27, 2023
hansejun added a commit that referenced this issue Jan 27, 2023
hansejun added a commit that referenced this issue Jan 27, 2023
@hansejun
Copy link
Member Author

accessToken은 받자마자 헤더로 지정. localStorage 및 Cookie로 저장하였을 때 보안 이슈.
refreshToken은 서버에서 httpOnly, secure 옵션을 주어 set.Cookie()로 설정. JS로 접근 제한 및 http 환경에서는 접근 x

인터셉트 코드 수정을 통해 한 페이지에서 n번의 요청이 있을 때 n번의 엑세스 토큰을 재발급을 하는 현상 제거.

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

No branches or pull requests

1 participant