Skip to content

Commit

Permalink
fix: pr comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Mar 11, 2024
1 parent 7ac44d0 commit 2b80dd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/supertokens/passwordless/Passwordless.java
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ public static ConsumeCodeResponse consumeCode(TenantIdentifier tenantIdentifier,
}
}

// We do not need this cleanup if we are creating the user, since it uses the email/phoneNumber of the
// device, which has already been cleaned up
// We do need the cleanup here, however, we do not need this cleanup in the `if` block above
// since it uses the email/phoneNumber of the device, which has already been cleaned up
if (loginMethod.email != null && !loginMethod.email.equals(consumedDevice.email)) {
removeCodesByEmail(tenantIdentifier, storage, loginMethod.email);
}
Expand Down

0 comments on commit 2b80dd5

Please sign in to comment.