首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >有Google authenticator API吗?

有Google authenticator API吗?
EN

Stack Overflow用户
提问于 2018-11-21 21:48:13
回答 2查看 23.6K关注 0票数 11

我正在尝试创建一个使用google authenticator的双因素身份验证器的web应用程序,所以我的问题是,google authenticator有api吗?

EN

回答 2

Stack Overflow用户

发布于 2019-11-14 01:08:25

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

首先,创建一个二维码进行配对,并结合您的应用描述,创建一个密码,如下所示;

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

票数 11
EN

Stack Overflow用户

发布于 2021-11-07 15:38:54

是的,快速浏览一下:

用户下载

  1. https://apps.apple.com/us/app/google-authenticator/id388497605或Google Authenticator应用程序

  1. 你代表你的用户生成一个“秘密”代码:

https://google-authenticator.p.rapidapi.com/new/

服务器将向您返回密码(例如"GXPTBCTI4DX4UFJB"),请保留代码,因为在步骤3和4中会用到它。

  1. 您可以通过以下方式为您的用户生成二维码:

https://google-authenticator.p.rapidapi.com/enroll/?secret=GXPTBCTI4DX4UFJB&account=JohnDoe&issuer=AcmeCorp

用户使用谷歌验证器应用程序扫描二维码,现在可以生成临时代码。

  1. 现在您可以通过以下方式验证代码:

https://google-authenticator.p.rapidapi.com/validate/?code=266677&secret=GXPTBCTI4DX4UFJB

在这里查看完整的教程https://rapidapi.com/chdan/api/google-authenticator/tutorials/easy-two-factor-authentication-(2fa)-with-google-authenticator

希望这能有所帮助。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53413527

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档