Skip to content

Commit a4ad06b

Browse files
committed
fix: Fido2 enrollment cancelling #143
1 parent e2e443f commit a4ad06b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/src/main/java/org/gluu/casa/ui/vm/user/SecurityKey2ViewModel.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public void add() {
296296

297297
@NotifyChange({ "uiEnrolled", "uiEnrolledPlatformAuthenticator", "newDevice", "newTouchId" })
298298
public void cancel() {
299-
logger.info("cancel invoked");
299+
300300
boolean success = false;
301301
try {
302302
/*
@@ -306,10 +306,12 @@ public void cancel() {
306306
* pressing cancel), we need to be obliterate the entry
307307
*/
308308
FidoDevice dev = null;
309-
if (platformAuthenticator && Utils.isNotEmpty(newTouchId.getNickName())) {
309+
if (platformAuthenticator && Utils.isNotEmpty(newTouchId.getId())) {
310310
dev = newTouchId;
311-
} else if (Utils.isNotEmpty(newDevice.getNickName())) {
311+
logger.debug("cancel invoked - platform authenticator");
312+
} else if (Utils.isNotEmpty(newDevice.getId())) {
312313
dev = newDevice;
314+
logger.debug("cancel invoked");
313315
}
314316
if (dev != null) {
315317
success = fido2Service.removeDevice(dev);

0 commit comments

Comments
 (0)