Two-factor authentication with code sent to email I'd like to ask you if there are any possibilities of a two-factor authentication with authentication code sent to email. I've found TFA module  which can send an SMS, and according to their documentation, also email:


  The TFA code can be sent out over mobile phone SMS (recommended) or
  via email.


but I haven't found any settings for email, it seems they just provide "API to customize the communication chanel". I've also found Rules module, which could be maybe used combined with other module. 

Are there any other possibilites how to do the two-factor authentication with email?
It looks like the recently posted OTP module supports emailing of its one-time passwords. It's still a sandbox project though and I haven't tried it myself.

It shouldn't be too difficult to add email support to the TFA module you mentioned. If you're interested in getting your feet wet with Drupal development, it might make a good starter project.

I suspect you would have to do some custom development to get Rules to handle generating of the codes. Either of the two options above would probably be quicker.

Maybe it's just an academic point, but keep in mind that by emailing the token, you're straying a bit from the idea of two-factor authentication, which entails "a knowledge factor ("something the user knows"), a possession factor ("something the user has")." The line gets a bit fuzzy already though, when you talk about logging in from your phone or forwarding text to a computer via services like Google Voice.