ufan0
V2EX  ›  问与答

请问本站第三方客户端是怎么实现登录的?

  •  
  •   ufan0 · Jul 1, 2024 · 1255 views
    This topic created in 684 days ago, the information mentioned may be changed or developed.
    根据本站官方文档: https://www.v2ex.com/help/api ,其使用的是 Bearer Authorization 。

    但在三方客户端中使用的是账号密码登录即可保持登录蛮久。

    猜测是通过 cookie ,但是没有公开 csrf 接口,csrf 很难处理,请问其通过账号密码登录并保持登录身份是如何实现的?
    5 replies    2024-07-02 21:21:00 +08:00
    ydatong
        1
    ydatong  
       Jul 1, 2024   ❤️ 1
    伟途亦可思中就是用的 cookie
    ufan0
        2
    ufan0  
    OP
       Jul 2, 2024
    @ydatong 谢谢,我去看下是否开源了
    ydatong
        3
    ydatong  
       Jul 2, 2024
    @ufan0 没有开源,我开发的😂
    ydatong
        4
    ydatong  
       Jul 2, 2024
    @ufan0 你 github 找一下开源的 V2EX app 看一下就知道了,实现原理都差不多
    ufan0
        5
    ufan0  
    OP
       Jul 2, 2024
    @ydatong #3 厉害,刚才在 app store 下载了,五分好评献上 o( ̄▽ ̄)d
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1058 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 18:34 · PVG 02:34 · LAX 11:34 · JFK 14:34
    ♥ Do have faith in what you're doing.