duanjiao6711 2018-01-08 14:04
浏览 30
已采纳

谷歌双向工厂认证PHP

I want to have a Google Authenticator for my website (PHP) / 2FA.

What I exactly want:

  • For the login page: username, password and (if enabled) GAuth (6 numbers).
  • In profile settings a person can scan the QR code in his Google Authenticator app and enable/disable the GAuth.
  • I do NOT want to use the google login button, just the 6 number authentication.

Info: It's a game website where people can register their account, which means every QR code is personalized to one user.

Question:

  • I have been searching the web a lot on how to implement this AND how to generate a QR code, but I have not found a useful tutorial. How can I implement this API?

I've installed composer https://github.com/google/google-api-php-client, but now I'm stuck.

  • 写回答

1条回答 默认 最新

  • dqtu14636 2018-01-12 13:50
    关注

    Although the app is Google's, what you are looking for is not an API from google. What you need is a TOTP php class. Here is one (quite old) that you can use: https://www.idontplaydarts.com/static/ga.php_.txt

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分