【发布时间】:2015-04-04 20:00:05
【问题描述】:
目前,我让用户通过在 Web 视图中向以下 URL 发送请求来登录 Microsoft Live:
https://login.live.com/oauth20_authorize.srf?client_id=[CLIENT ID]&scope=[SCOPES]&response_type=token&redirect_uri=[REDIRECT URI]&display=popup
这很完美,我收到并保存了access_token 和authentication_token。请注意,即使我包含wl.offline_access 范围,它也不会返回refresh_token。
访问令牌过期需要刷新时会出现问题。我正在尝试使用Microsoft's documentation 中的方法刷新令牌:
https://login.live.com/oauth20_token.srf?client_id=[CLIENT ID]&redirect_uri=[REDIRECT URI]&client_secret=[CLIENT SECRET]&refresh_token=[WHAT TO PUT HERE?]&grant_type=refresh_token
但是,refresh_token 从未在登录中返回,所以我不确定要传递什么。请注意,将authentication_token(它应该用于什么?)作为refresh_token 发送参数结果如下:
{
"error": "invalid_grant",
"error_description": "The provided value for the input parameter 'refresh_token' is not valid."
}
有谁知道如何通过他们的 REST API 正确刷新 Microsoft Live 令牌?
【问题讨论】:
-
你弄清楚如何获取刷新令牌了吗?
标签: rest oauth access-token microsoft-live-connect