简体   繁体   English

使用Twilio的Auth验证电话的多种方法

[英]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.

相关问题 在多台服务器上上传文件的方法? - Ways to Upload File on multiple servers? 使用C#/ mvc的Twilio电话号码屏蔽 - Twilio Phone Number Masking Using C#/mvc Twilio在ASP.NET-MVC中尝试创建可用的VoIP电话失败,因为在网站上只能看到XML而不是电话 - Attempt to create usable VoIP phone by Twilio in ASP.NET-MVC fails as Only XML is visible on the website instead of phone 调试异步堆栈的预期方法-发生了什么? - Expected ways to debug an async stack - what's going on? Bcrypt密码验证 - Bcrypt password verifying 首先在asp.net代码中以多种方式连接两个上下文模型 - Connecting two context models in multiple ways in asp.net code first iframe / script是在ASP.NET MVC中具有多个独立控件的唯一方法吗? - Are iframes/script the only ways to have multiple independent controls in ASP.NET MVC? 传递MVC模型的列名称以在HTML.ActionLink()帮助器中显示的方法 - Ways to pass MVC model's column name to display in HTML.ActionLink() helper 有哪些方法可以将ASP.NET应用程序部署到多个EC2实例? - What are some ways to deploy an ASP.NET application to multiple EC2 instances? 仅从控制器通过DateTime对象传递日期。 尝试多种方式绑定时间 - Passing only Date from controller through DateTime Object. Trying Multiple ways bind Time alongwith
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM