用户使用电话号码注册时,需要进行两因素验证

问题描述 投票:1回答:1

我已经使用以下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

[我也要在用户注册时如何执行上述操作?

ruby-on-rails ruby two-factor-authentication
1个回答
0
投票

作为此问题的OP,我遵循以下简单的解决方案来实现此目的,并且效果很好。

https://www.mccartie.com/tech/2015/10/20/sms-verification.html

© www.soinside.com 2019 - 2024. All rights reserved.