netzbegruenung / keycloak-mfa-plugins

Keycloak plugins for MFA (enforce MFA, SMS authentication step, native app integration)
Apache License 2.0
71 stars 21 forks source link

SMS 2FA plugin stuck in simulation mode #72

Closed dsputnikk closed 3 months ago

dsputnikk commented 6 months ago

During testing I somehow managed to get my plugin stuck in "simulation" mode. I've gone as far as to destroy all custom flows and deleting the sms step. Saving. Coming back and readding the flow and ensuring simulation toggle is off. However when client initiates SMS flow, my console still shows * SIMULATION MODE and I don't know how to turn it off now.

melegiul commented 4 months ago

When you have problems with switching the settings of the SMS Authenticator, then probably a hacky solution to access the Authenticator provider settings might be the reason. See https://github.com/netzbegruenung/keycloak-mfa-plugins/tree/main/sms-authenticator#setup

The config must be named "sms-2fa" (alias). If possible just use one SMS Authenticator together with its config in your flow. That would be the easiest option.

You could also use multiple Authenticators and Configs, but then you must keep in mind, that any time the SMS gateway is called by required actions (e.g. when user clicks on setup on account console) only your original config named "sms-2fa" matters.