-
-
Notifications
You must be signed in to change notification settings - Fork 439
refresh_token 大于 1KB 导致需要使用 Cloudflare Worker KV 存储来解决的方法 #58
Comments
好的,第一个问题只影响本地预览,不碍事,不填了 第二个问题,谢谢大佬了 |
首先还是一样的操作,拿到 之后修改代码,在 // ./src/auth/onedrive.js
// ...
export async function getAccessToken() {
const timestamp = () => {
return Math.floor(Date.now() / 1000)
}
const refresh_token = await BUCKET.get('refresh_token')
// 之后所有的 config.refresh_token 都直接改为 refresh_token
// ...
} 这样应该就可以了,顺便还要把其他原有定义了 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
key应该是 |
./src/auth/onedrive.js 72:22
按教程操作之后提示这 |
已经删了 |
./src/auth/onedrive.js 72:22
试过了,还是这样 |
贴一下 |
import config from '../config/default' /**
// Fetch access token // Token expired, refresh access token with Microsoft API. Both international and china-specific API are supported const resp = await fetch(oneDriveAuthEndpoint, {
} else { /**
// ./src/auth/onedrive.js // ... const refresh_token = await BUCKET.get('refresh_token') // 之后所有的 config.refresh_token 都直接改为 refresh_token |
才发现。。你这加的什么东西。。。 |
大佬,用你刚刚给的库部署好了。一样的操作,不晓得啥情况。 |
wrangler.toml中的preview_id = ""应该填什么?我使用的是GitHub Actions
使用Firebase 数据库时在Cloudflare [Workers填写在大于1KB的变量时按照这个教程可以解决https://github.com//issues/16
但现在使用Cloudflare KV不知道怎么操作了。。。希望大佬指点迷津
The text was updated successfully, but these errors were encountered: