diff --git a/youlai-auth/src/main/java/com/youlai/auth/security/extension/mobile/SmsCodeAuthenticationProvider.java b/youlai-auth/src/main/java/com/youlai/auth/security/extension/mobile/SmsCodeAuthenticationProvider.java index 9157c3f4a..9513dde09 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/security/extension/mobile/SmsCodeAuthenticationProvider.java +++ b/youlai-auth/src/main/java/com/youlai/auth/security/extension/mobile/SmsCodeAuthenticationProvider.java @@ -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; }