Closed espensgr closed 6 years ago
Yes, the main logic is in services, which you could call from your own plugin. Users who have 2FA turned on will be redirected to the verification screen. For front-end users you would have to build templates which allow the user to turn on the 2FA.
@espensgr I've just added some screens to the readme give an impression of the admin interface. I imagine you need something similar on the front-end.
nice! yeah i was hoping for some code documentations on what tags i can use in my templates so i can setup this on the front end, and the logic around it. Are that something you are planing to do?
Not right now, but you can take a look in the controllers and templates. I've kept the logic to a minimum, which would make it easy to copy for front-end usage.
Please be careful with logging in and the front-end. The plugin only protects the CP pages, so you need to write your own checks for handling that on the front-end. see: https://github.com/born05/craft-twofactorauthentication/blob/craft-2/TwoFactorAuthenticationPlugin.php#L56
edit: updated source link
is it possible to use this for front end login forms?