Two-Factor Authentication with OTP (Authenticator)
We can enable two-factor authentication for platform users through the IM.
This two-factor authentication is implemented through an Authenticator, such as Microsoft, Google, or Free OTP.
Below, we will configure the necessary settings in the IM (Keycloak).
Configuring the OTP Authentication Flow
We need to access the Keycloak administration console and select the vertical/realm where we want to activate it.
Then, in the left menu, we select “Authentication.” On this screen, we choose the authentication flow: “Multitenant-browser-flow”
Once inside the flow, we select “Add step” to add the OTP step. Using the search bar, we add the “OTP Form” step.
This step will be added at the end of the flow. We will need to drag and drop it so that it is on the same level as the “Vertical choice form”, placed just after it.
Finally, in the dropdown menu, select “Required.” It can be deactivated at any time without losing the configuration of authenticators already linked to users.
Linking Authenticator to a User
Once two-factor authentication is enabled, the first time a user logs in, they will be prompted to link an Authenticator to their account.
We will proceed to configure the application accordingly.
Once configured, the user session will start. The next time the user logs in, they will be required to enter an OTP token to access.