I am using Spring Boot, Spring Security, OAuth2 and JWT to authenticate my application, but I keep getting this nasty error and I don\'t have any idea what is wrong. My
I struggled with this error while doing a Spring Security Course.
My problem was that even though in the AuthenticationManager I was using the encoding, e.g:
@Autowired
public void configureGlobal(final AuthenticationManagerBuilder auth) throws Exception {
auth.userDetailsService(userDetailsService)
.passwordEncoder(passwordEncoder());
}
The Problem was that I was not Encoding the Password when I was saving the Users!! Example:
final Principal entity = new Principal(loginName, passwordEncoder.encode(pass), roles);