【问题标题】:Google Authenticator - missing otpauth protocol parameterGoogle Authenticator - 缺少 otpauth 协议参数
【发布时间】:2015-03-19 09:05:29
【问题描述】:

我正在尝试为我的网站的 Google Authenticator 应用程序生成一个 QR 码(用于双重身份验证用户登录。)我按照 this guideline 生成一个 URI(使用 Google Chart API。)

所以我编了这个网址:

https://chart.googleapis.com/chart?chs=200x200&chld=M%7C0&cht=qr&chl=otpauth://totp/Example:alice@gmail.com?secret=TGABZXEP4LKB46AX&issuer=Example

创建了 QR 码(来自上面的链接。)

但是,当我使用 iPhone 的 Google Authenticator app 扫描它时,我得到的行并没有像其他服务那样显示发行者(在此屏幕截图中以红色圈出)——请参阅其他条目中的 Google:

那么我在那里缺少什么参数?

【问题讨论】:

    标签: authentication oauth google-oauth google-authenticator


    【解决方案1】:

    otpauth uri 必须在图表 url 中编码。

    https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl=otpauth%3A%2F%2Ftotp%2FExample%3Aalice%40gmail.com%3Fsecret%3DTGABZXEP4LKB46AX%26issuer%3DExample

    您可以将...&issuer=... 替换为...%26issuer=...,但最好使用正确编码的网址。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多