vevlins

命令行工具打开浏览器登录实现鉴权的原理是什么?

  •  
  •   vevlins · Oct 31, 2022 · 1723 views
  •   You need to sign in to view this topic
    This topic created in 1477 days ago, the information mentioned may be changed or developed.

    类似于腾讯云开发 cli 等一些工具,可以在 xxx login 命令后拉起一个页面,页面登录后命令行完成鉴权。命令行跟浏览器是怎么交互的?

    vevlins
    vevlins
    OP
    Oct 31, 2022
    1
    自抛自扣,搜到解决方案了,跟检测本地 QQ 是否登录的原理差不多。
    https://www.altostra.com/blog/cli-authentication-with-auth0

    本地启动一个服务 xxxx ,页面登录完成后回调 localhost:xxxx ,然后把动态口令存下。
    vevlins
    vevlins
    OP
    Oct 31, 2022❤️1
    2
    再提供一个思路,也可以生成一个带随机串的链接,把随机串写入本地当作 token ,打开链接时把 token 和登录用户绑定。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4290 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 09:23 · PVG 17:23 · LAX 01:23 · JFK 04:23
    ♥ Do have faith in what you're doing.