mesutpiskin / keycloak-2fa-email-authenticator

🔒 Keycloak Authentication Provider implementation to get a two factor authentication with a OTP/code/token send via Email (through SMTP)
https://medium.com/@mesutpiskin/two-factor-authentication-via-email-in-keycloak-custom-auth-spi-935bbb3952a8
Apache License 2.0
140 stars 83 forks source link

Set `configuredFor` if the user has an email #37

Closed remyduthu closed 4 months ago

remyduthu commented 4 months ago

The goal of this PR is to implement the configuredFor method. It returns true if the user has an email. Otherwise, it returns false. This is to prevent using the Email OTP when the user has no email.

remyduthu commented 4 months ago

The idea would be to configure a multi-factor flow as mentioned here: https://github.com/keycloak/keycloak-community/blob/main/design/multi-factor-admin-and-step-up.md#flow-logic-examples. For example:

Screenshot 2024-05-06 at 23 29 59