V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
yazoox
V2EX  ›  问与答

不是很理解,为什么 dropbox API token 不过期?这是什么设计思想/原理?

  •  
  •   yazoox · 2019-01-16 10:57:25 +08:00 · 1125 次点击
    这是一个创建于 1898 天前的主题,其中的信息可能已经有所发展或是发生改变。

    最近需要访问 OneDrive, Box & Dropbox 上的文件。

    研究了一下,前面两个,都有 token & refresh token,token 都是很快(比如 1 小时)过期,然后用 refresh token 去取新的 token。refresh token 也是 3 个月或者 6 个月过期。

    但是 Dropbox 好像没有。翻 API 在线文档,如下:( https://www.dropbox.com/developers/support

    Do API access tokens expire?
    App access tokens effectively don't expire, but users can manually revoke tokens by going into My apps. In the case of apps with app folder access, if the user deletes the app folder, your app's access token will no longer be valid.
    
    You should only process the authorization once, and save the access token for all future calls for that user. If an existing access token is invalid, (in which cases calls will return 401), you should prompt the user to re-authorize your app.
    

    这样的话,那不是使用 Dropbox 的 API,很不安全?需要 client app 自己去处理 token 的问题?

    不是很理解,请教一下大家。谢谢

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5199 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 09:40 · PVG 17:40 · LAX 02:40 · JFK 05:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.