我已经使用以下gem实现了两个因素验证。
https://github.com/Houdini/two_factor_authentication
文档简单明了。当用户尝试登录时,此方法工作正常。但是,当注册user.rb中的以下操作无效时。
def send_two_factor_authentication_code(code)
end
上面的代码是生成的OTP
https://github.com/Houdini/two_factor_authentication
[我也要在用户注册时如何执行上述操作?
作为此问题的OP,我遵循以下简单的解决方案来实现此目的,并且效果很好。
https://www.mccartie.com/tech/2015/10/20/sms-verification.html