- 设置
access_token为1天有效期,refresh_token为7天有效期, - 如果
access_token未过期, 则直接通过登录判断 (不更新access_token或refresh_token) - 当
access_token过期, 则检测refresh_token,refresh_token未过期时, 更新并返回access_token和refresh_token - 当
access_token过期,refresh_token也过期, 则返回未登录
ps: 由于
refresh_token的有效期大于access_token的有效期 (而二者是同时更新的), 所以不存在access_token未过期, 而refresh_token过期的情况