• 请不要在回答技术问题时复制粘贴 AI 生成的内容
hit9
V2EX  ›  程序员

web app的Github认证的过程

  •  
  •   hit9 ·
    hit9 · Mar 3, 2013 · 3506 views
    This topic created in 4848 days ago, the information mentioned may be changed or developed.
    我看了下API的文档,大致这么个意思~

    先重定向到一个页面,然后github发回一个code,我们的应用程序接收这个code

    然后把code和client_id, client_secret一起发送到github的一个url, github会返回access_token

    我有几个问题想咨询下大家。。

    1. 这个token是不是短期有效?

    2. 要维持用户的一定时间内的登录权限的话,数据库中需要存储的用户的github信息是什么? cookies中存储的呢?

    谢谢
    1 replies    1970-01-01 08:00:00 +08:00
    Cadina
        1
    Cadina  
       Mar 3, 2013   ❤️ 1
    看下OAuth的RFC就知道了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2914 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 10:58 · PVG 18:58 · LAX 03:58 · JFK 06:58
    ♥ Do have faith in what you're doing.