diff --git a/web/src/main/java/org/springframework/security/web/webauthn/management/Webauthn4JRelyingPartyOperations.java b/web/src/main/java/org/springframework/security/web/webauthn/management/Webauthn4JRelyingPartyOperations.java index cdd5065e36..59d0729288 100644 --- a/web/src/main/java/org/springframework/security/web/webauthn/management/Webauthn4JRelyingPartyOperations.java +++ b/web/src/main/java/org/springframework/security/web/webauthn/management/Webauthn4JRelyingPartyOperations.java @@ -345,7 +345,7 @@ public class Webauthn4JRelyingPartyOperations implements WebAuthnRelyingPartyOpe } private List findCredentialRecords(Authentication authentication) { - if (authentication == null || this.trustResolver.isAnonymous(authentication)) { + if (!this.trustResolver.isAuthenticated(authentication)) { return Collections.emptyList(); } PublicKeyCredentialUserEntity userEntity = this.userEntities.findByUsername(authentication.getName());