SaiUpadhyayula / spring-reddit-clone

Reddit clone built using Spring Boot, Spring Security with JWT Authentication, Spring Data JPA with MySQL, Spring MVC. The frontend is built using Angular - You can find the frontend source code here - https://github.com/SaiUpadhyayula/angular-reddit-clone
658 stars 386 forks source link

Cannot validate refreshToken #19

Closed jackiewang5566 closed 3 years ago

jackiewang5566 commented 3 years ago

Hi I'm having an issue to refresh the token after the jwt token expired. Followed each steps on youtube channel: https://www.youtube.com/watch?v=OdXojEhQcOU I checked the log and noticed that it's because in the JwtAuthenticationFilter called jwtProvider.validateToken(jwt) and from validateToken method, it will throw ExpiredJwtException which will block the logic of any subsequent controller logic.

Any suggestion to resolve it?

jackiewang5566 commented 3 years ago

Found the issue, forgot to add posts request in security config which load before jwtAuthenticationFilter.