是否有Google身份验证器API

时间:2018-11-21 13:48:13

标签: google-authenticator

我正在尝试使用Google身份验证器创建一个使用两因素身份验证器的网络应用程序,所以我的问题是,是否存在Google身份验证器的api?

1 个答案:

答案 0 :(得分:1)

关于如何为Google Authenticator创建自己的客户端的示例很多,但是,您也可以使用API​​,这可能会更容易。

首先,您要创建一个QR码与之配对,并与您的应用说明结合在一起,并创建一个如下的密码:

https://www.authenticatorApi.com/pair.aspx?AppName=MyApp&AppInfo=John&SecretCode=12345678BXYT

然后,用户配对后,您可以使用validate API调用来验证其PIN;

https://www.authenticatorApi.com/Validate.aspx?Pin=123456&SecretCode=12345678BXYT

此API的源代码可在GitHub上以开源形式获得; https://github.com/infiniteloopltd/AuthenticatorAPI.com

相关问题