Generic 2FA register module
Summary
We currently offer 2FA methods that require a pre-existing attribute
- an email address from user backend for
2F::Mail2F
- a phone number for most use cases of
2F::Ext2F
(SMS OTP)
We should offer a generic 2F::Register module that lets user fill out this information themselves
Design proposition
Users that wish to enable BOTH self-registered mail and SMS will need to enable the new module twice, so it must be made compatible with the sfExtra system
Also, Mail2F, Ext2F and Rest2F have to be modified so they can use info from _2fDevices instead of session directly. Maybe through a special syntax?
The register module will have to call Mail2F/Ext2F/REST2F etc for validation before accepting the registration. Maybe some refactoring could be done to avoid duplication in other 2FA modules?