1

如何为已连接的 Vkontakte 提供程序(通过omniauth 连接)刷新(更新)访问令牌?

所以,在我的数据库中,我有这样的字段对象:

id: integer, provider: string, uid: string, user_id: integer, token: string, expires_at: datetime, created_at: datetime, updated_at: datetime, type: string, reset_at: datetime, refresh_token: string, refreshed_at: datetime, root_id:整数,刷新:布尔值

我应该做什么样的请求来获取新令牌并在 DB 更新我的提供者对象?

4

1 回答 1

2

看起来您不需要刷新访问令牌,因为当您请求“离线”访问时,令牌的生命周期是永远的(expires=0)

于 2015-02-13T07:06:42.647 回答