We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc016fc commit 29b0223Copy full SHA for 29b0223
timeless-api/src/main/java/dev/matheuscruz/presentation/SignInResource.java
@@ -47,13 +47,11 @@ public Response signIn(@Valid SignInRequest req) {
47
if (userOptional.isPresent()) {
48
user = userOptional.get();
49
} else {
50
- // try to find by plain text
+
51
try {
52
user = (User) entityManager.createNativeQuery("SELECT * FROM users WHERE email = :email", User.class)
53
.setParameter("email", req.email()).getSingleResult();
54
-
55
- // if found, we need to migrate the user to the new encryption format
56
- // but first we need to check the password
57
Boolean checked = BCryptAdapter.checkPassword(req.password(), user.getPassword());
58
59
if (!checked) {
0 commit comments