【发布时间】:2015-04-10 14:05:40
【问题描述】:
我正在按照Microsoft onedrive documentation 授权代码流向我的用户授予对其 onedrive 文件的访问权限。
我获得了 access_code 并使用 ruby 发送了一个带有 access_code、client_id、clien_secret 的 POST 请求,并获得了 access_token 作为 JSON 响应。
当我尝试将此 access_token,scopes,state,.. 与 My Redirect_url 一起附加以访问 Onedrive 文件选取器时,窗口将关闭。以下是该示例的 URL
http://MY_REDIRECT_URL/onedrive#access_token=My_access_token&token_type=bearer&expires_in=3600&scope=wl.skydrive%20wl.signin&state=redirect_type%3dauth%26display%3dpage%26request_ts%3d1427963180884%26response_method%3durl%26secure_cookie%3dfalse&user_id=My_USER_ID
当我在授权令牌流中使用相同的 URL 时,它会正确打开文件选择器。 当我检查 wl_auth cookie 值时,它说
error=invalid_cookie&error_description=The%20'wl_auth'%20cookie%20has%20been%20modified%20incorrectly.%20Ensure%20that%20the%20redirect%20URI%20only%20modifies%20sub-keys%20for%20values%20received%20from%20the%20OAuth%20endpoint.&status=connected
【问题讨论】:
标签: ruby url oauth-2.0 authorization onedrive