Refine login error handling and adjust Google signup flow

This commit is contained in:
Tim
2025-07-15 11:06:33 +08:00
parent f65df582f6
commit abb6c98df7
6 changed files with 87 additions and 43 deletions

View File

@@ -94,6 +94,10 @@ public class UserService {
.filter(user -> passwordEncoder.matches(password, user.getPassword()));
}
public boolean matchesPassword(User user, String rawPassword) {
return passwordEncoder.matches(rawPassword, user.getPassword());
}
public Optional<User> findByUsername(String username) {
return userRepository.findByUsername(username);
}