[英]Multiple Ways Verifying Phone with Twilio's Authy
I'm confused on how exactly to verify a phone with Authy. 我对如何准确地通过Authy验证电话感到困惑。
I have a C#/MVC view that accepts a country code and phone number and I call AuthyClient.RegisterUser and that works fine. 我有一个接受国家/地区代码和电话号码的C#/ MVC视图,并且我调用AuthyClient.RegisterUser,并且工作正常。 I store the AuthyId that comes back.
我存储回来的AuthyId。
I then call AuthyClient.SendSms with force=true. 然后,我用force = true调用AuthyClient.SendSms。 <--- does this send them a verification code?
<---这会向他们发送验证码吗?
My test user didn't even enter a code on my site and in Twilio, he's showing as verified. 我的测试用户甚至没有在我的网站上输入代码,而在Twilio中,他显示为已验证。 Is that because he opened up the Authy app after getting registered?
那是因为他在注册后打开了Authy应用程序?
Are there multiple ways to verify a phone then? 那么,有多种方法可以验证电话吗?
Twilio developer evangelist here. Twilio开发人员布道者在这里。
The API requests you are making here, starting with the call to AuthyClient.RegisterUser
is actually the way that you perform two factor authentication with the Authy APIs. 从
AuthyClient.RegisterUser
调用开始,您在此处发出的API请求实际上就是使用Authy API执行两因素身份验证的方式。
To verify a phone with Authy you only need to make two API calls. 要使用Authy验证电话,您只需拨打两次API。 The first sends a verification code and the second requires the user to input the code they received and then verifies it .
第一个发送验证码 ,第二个要求用户输入接收到的验证码,然后对其进行验证 。
I can see you're using the authy.net library, which is sadly archived on GitHub now because it wasn't kept up to date. 我可以看到您正在使用authy.net库,该库现在不幸地存储在GitHub上,因为它不是最新的。 I'm not a .NET developer, but from what I can see in the codebase it didn't support the Verify endpoints.
我不是.NET开发人员,但是从代码库中可以看到,它不支持Verify端点。 For this reason, I'd recommend you construct the HTTP requests yourself.
因此,建议您自己构造HTTP请求。
Take a read through the Verify documentation , it has all the URLs you need to make requests to including the required parameters. 通读“ 验证”文档 ,其中包含发出请求所需的所有URL,包括必需的参数。 Let me know how you get on with that.
让我知道你如何处理。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.