fix(SmsCodeAuthenticationProvider.java): 修复手机短信验证码认证授权提示用户名或密码错误问题

This commit is contained in:
有来技术 2021-11-12 22:31:45 +08:00
parent c510751da3
commit 6a5555ec29

View File

@ -46,7 +46,7 @@ public class SmsCodeAuthenticationProvider implements AuthenticationProvider {
redisTemplate.delete(codeKey);
}
UserDetails userDetails = ((MemberUserDetailsServiceImpl) userDetailsService).loadUserByMobile(mobile);
SmsCodeAuthenticationToken result = new SmsCodeAuthenticationToken(userDetails, new HashSet<>());
SmsCodeAuthenticationToken result = new SmsCodeAuthenticationToken(userDetails, authentication.getCredentials(), new HashSet<>());
result.setDetails(authentication.getDetails());
return result;
}