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으로 expired access token 재발급 받기 #17

Open
Anna-Jin opened this issue Jul 8, 2022 · 2 comments
Open

refresh token으로 expired access token 재발급 받기 #17

Anna-Jin opened this issue Jul 8, 2022 · 2 comments
Assignees

Comments

@Anna-Jin
Copy link
Member

Anna-Jin commented Jul 8, 2022

authController 에서 refresh 부분 수정하기

@Anna-Jin
Copy link
Member Author

Refresh token을 access token이 만료되기 전에 자동으로 재발급 해줄 지, 아니면 만료될 때마다 프론트가 access token 재발급 api를 호출하게 할 지 정하기

@Anna-Jin Anna-Jin self-assigned this Jul 11, 2022
@Anna-Jin
Copy link
Member Author

<해결>Access token 유효성 검사를 하는 로직에서 '만료된 JWT 토큰'인 경우에도 에러를 catch하고 null로 넘겨버리기 때문에 만료된 access token을 가지고 토큰 재발급을 하지 못하는 문제.

Anna-Jin added a commit that referenced this issue Jul 13, 2022
Anna-Jin added a commit that referenced this issue Jul 18, 2022
토큰 만료 시간이 5분 남았을 때부터 재발급 가능하게 변경. 프론트에서 setTimeout 설정을 통해 일정 시간마다 토큰을 재발급받도록 변경함.
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