Can you use push notifications as a form of MFA with FusionAuth?
-
I have a mobile app and want to use push notifications for my MFA. Is that possible/supported with FusionAuth?
-
As of writing, there is no direct support for push notifications as an MFA method in FusionAuth. If you would like such support, please open a feature request with more details about your use case.
However, you should be able to build something that sends a code via a push notification. Here's how to do that. (This requires a Starter, Essentials or Enterprise plan.)
This illustrates how to do this using the hosted login pages; if you use the APIs, it's a slightly different workflow, as outlined in the MFA guide.
- configure FusionAuth to require a phone number when the user registers
- set up your android or ios device to send back the device id when the app is installed
- tie the device id to the user's phone number in your backend system
- set up a generic messenger. The messenger will send a phone number and a message when an MFA challenge occurs.
- look up the device id from the phone number in your system
- use the appropriate service to send a push notification with the code
- have the user enter the code in the MFA challenge screen
-