原文地址:https://blog.1234234.xyz/archives/24/
仓库地址:https://github.com/heymind/OneDrive-Index-Cloudflare-Worker
安装过程请看仓库README,这里不做赘述
由于前段时间:dd.1234234.xyz的onedrive节点突然异常,访问限制`Worker threw exception`,我第一时间还以为是账号出啥情况了,在debug之后发现原来是有段时间由于该节点一直没人访问,导致refresh_token过期失效了,报错信息如下:
- {"error":"invalid_grant","error_description":"AADSTS700082: The refresh token has expired due to inactivity. The token was issued on 2021-04-09T20:24:13.7429736Z and was inactive for 90.00:00:00.\r\nTrace ID: fc3c1f0d-acf2-497c-ba0f-9d7087f63900\r\nCorrelation ID: 9ecc7d33-6640-4f96-979e-729c0081f737\r\nTimestamp: 2021-09-05 19:12:37Z","error_codes":[700082],"timestamp":"2021-09-05 19:12:37Z","trace_id":"fc3c1f0d-acf2-497c-ba0f-9d7087f63900","correlation_id":"9ecc7d33-6640-4f96-979e-729c0081f737","error_uri":"https://login.microsoftonline.com/error?code=700082"}
故而尝试重新获取一个新的值,在该过程中遇到了如下BUG:
- {"error":"invalid_request","error_description":"AADSTS9002326: Cross-origin token redemption is permitted only for the 'Single-Page Application' client-type.\r\nTrace ID: 5f4789ca-3de2-4dd1-8060-9bfff1d33b00\r\nCorrelation ID: b546ee9d-faf8-4b35-8a69-9a856521e566\r\nTimestamp: 2021-09-05 19:07:51Z","error_codes":[9002326],"timestamp":"2021-09-05 19:07:51Z","trace_id":"5f4789ca-3de2-4dd1-8060-9bfff1d33b00","correlation_id":"b546ee9d-faf8-4b35-8a69-9a856521e566","error_uri":"https://login.microsoftonline.com/error?code=9002326"}
这里记录下如何解决:首先还是一样,获取一个Code值,在图中的client id填入对应的值后点击Authorize:
在获取到Code后我们便开始获取refresh_token,填入我们的client_secret:
这时候先别急着点GET TOKEN,我们打开BurpSuite(抓包工具,此处可以替换为其他软件)进行抓包:
热议
2楼 breakmyheart 9小时前
绑定
3楼 hjvn2211445 9小时前
refresh token大概是3个月有效,每次刷新access token会同时生成一个新的refresh token
之前oneindex白屏的情况就是没有把新的refresh token写进配置,
如果有用oneindex的,请参考这文章
解决oneindex显示空白页/白屏问题
4楼 nnt 9小时前
refresh token大概是3个月有效,每次刷新access token会同时生成一个新的refresh token
之前oneindex白屏 ...
这个worker版貌似没办法更新,除非得改改,从worker的KV 命名空间获取refresh token
5楼 hanweizhe 7小时前
技术贴 当赏
6楼 sunete 6小时前
不访问就会失效,加个监控就好了吧?
7楼 xjjmjj 6小时前
知识帖,绑定。
8楼 CACss 3小时前
好的
申明:本文内容由网友收集分享,仅供学习参考使用。如文中内容侵犯到您的利益,请在文章下方留言,本站会第一时间进行处理。
谷姐靓号网






评论前必须登录!
立即登录 注册