17

Google Authenticator 密钥导出到新iPhone

 3 years ago
source link: https://www.wyr.me/post/652
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Google Authenticator 密钥导出到新iPhone
Google Authenticator 密钥导出到新iPhone

此文章提供的方法可以将Google Authenticator(安卓中显示为Google 身份验证器)中所有的密钥导出到其它的2FA双因素认证软件(例如Microsoft AuthenticatorStep TwoDuo MobileAuthy等二次验证APP),甚至从Android版本的Google Authenticator导入到IOS版本的Google Authenticator(例如将华为手机里面的身份验证数据导入到IPhone,两个手机可以同时使用)。

研究迁移方法的原因是,Android版本的Google Authenticator右上角提供了迁移账号功能,而在IPhone中无法导入从Android中迁移出来的账号(估计是IOS版本年久失修)。我的密码数量很多,挨个到原始账号设置的地方重置二次验证数据不太现实。

  • 已安装Google Authenticator
  • 手机具有拍照功能
  • 安装了Nodejs
  • 一个QR扫描仪或使用微信扫一扫功能
  • 您需要是一个专业的计算机使用者

Android版本的Google Authenticator右上角提供了迁移账号功能,将会生成二维码用于迁移账号。需要注意的是,如果你的密码数量超过10个,APP会将每10个密码生成一个二维码,你需要保存所有的二维码。

具体步骤:

  1. 打开Google Authenticator应用。
  2. 点击设置(三个点,右上角),然后转移帐户
  3. 选择导出帐户
  4. 如果提示,请进行身份验证。
  5. 选择您要导出的帐户(默认为all)。
  6. 单击“下一步”,然后捕获QR码的图片。
    • 注意:屏幕截图已被该应用禁用。 使用笔记本电脑的网络摄像头,数码相机或其他电话。
  7. 点击下一步,对显示的所有QR码重复步骤6(如果您有很多帐户)。
  8. 解码QR码(使用QR扫描仪微信扫一扫)以获得otpauth-migration://offline?data=...URI。
  9. 克隆/下载此存储库https://github.com/yi-ge/google-authenticator-exporter(PS:感谢原开源项目https://github.com/krissrex/google-authenticator-exporter,我基于此项目添加了生成二维码功能)。
  10. 运行npm install
  11. 运行npm run start并在出现提示时输入URI。
  12. 如果要保存输出,请输入yaccounts.json

example.png

此时,你的秘钥数据已经解码并存储到accounts.json文件夹中。

生成二维码

执行node qrcode.js,将依据accounts.json在终端生成多个二维码。使用你喜欢的2FA应用程序扫码即可录入秘钥。

qrcode.png


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK