Open 99bird opened 5 years ago
Can you tell me what exception you are getting in your application after hitting refresh token url?
the exception is "java.lang.IllegalStateException: UserDetailsService is required".
@99bird Well thats what I thought. Just define a custom service extending UserDetailService and that will fix the issue. FYI, userDetailService is required to validate whether the user is still active and was not blocked for some reason.
I'm sure the userDetails has exisit. It'work well when I get an access_token
@99bird userDetailService is not responsible when you are generating access_token instead authenticationProvider does that. userDetailService comes into picture when you are trying to refresh token. FYI, make sure you created the bean of userDetailService properly i.e @service, @Bean or any other way. One more thing, can you update the title and description properly so that its easier for anyone in the future and label to question also.
I have the same problem but in my case i can get the UserDetails but after that and I don't know why spring calls my loadUserByUsername() method. this is the mehod that raise a UsernameNotFoundException
@christian1607 As I already mentioned userDetailService is responsible for validating whether user is still active or not. Please check my previous comment.
@aaabidunique you're right.
I use username password to get access_token and refresh_token ,then ,I use the refresh_token to refresh token . response is server error. All was default config java.lang.IllegalStateException: UserDetailsService is required.