Custom MFA message type

Would be possible to have a custom message type for MFA?
Something like WhatsApp or Telegram?

I think with Send Message Hook I can override the SMS behavior and send the token to anywhere, but I wouldn’t like to loose the real SMS, it would be an extra option.

Hello @raafvargas - welcome to the Auth0 Community!

In this case, you would have to use the Send Message Hook, as you specified.

You can actually write different code in the Send Message Hook. For example, before starting MFA, you can ask the user their preference and set it in the app_metadata. Then, write logic for SMS, Telegram and WhatsApp, and add logic that says something along the lines of:

if (context.user.app_metadata.mfa_delivery === 'sms') {
    sms code here and call back
} else if (context.user.app_metadata.mfa_delivery === 'telegram') {
    telegram code here and call back
} else if (context.user.app_metadata.mfa_delivery === 'whatsapp') {
    whastsapp code here and call back
1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.