OTP based login for external DB user

2FA through authenticator apps like google authenticator, FreeOtp etc works fine for internal keycloak users. However, it doesn’t work for federated/external DB users. Is there an SPI that I can use ? What’s the procedure to address the problem? Thanks in advance.