keycloak-spi-trusted-device icon indicating copy to clipboard operation
keycloak-spi-trusted-device copied to clipboard

TrustedDeviceCondition does not work without configuration

Open galimru opened this issue 1 year ago • 2 comments

First of all, let me say you did a great work, thank you for that extension!

I think I found a small bug for condition TrustedDeviceCondition when it's added without setting up alias and configuration. Despite UI shows Negate toggle is enabled by default, the whole configuration is null. So without it, condition returns always false which skips whole 2FA subflow.

https://github.com/wouterh-dev/keycloak-spi-trusted-device/blob/05cb4d8578bac45aee3cb81973567145460816ea/spi/src/main/java/nl/wouterh/keycloak/trusteddevice/authenticator/TrustedDeviceCondition.java#L27-L34

In fact, I don't understand what is purpose of this toggle.

galimru avatar Jun 12 '24 12:06 galimru