Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refresh_token 已存在情况下无法授权账户 #1

Open
kamasylvia opened this issue Jan 30, 2023 · 1 comment
Open

refresh_token 已存在情况下无法授权账户 #1

kamasylvia opened this issue Jan 30, 2023 · 1 comment

Comments

@kamasylvia
Copy link

我第一次运行授权的目标账户错了,想要重新授权一个子账户,结果访问结果永远都是 https://welcome.developers.workers.dev。
查看代码发现只有在没有 refresh_token 的情况下才可以正常授权。

if (await Token.get("refresh_token") !== null) {
return fetch("https://welcome.developers.workers.dev");
}

请问重复授权会造成什么不良后果吗?是否应该修改或删除这段代码以便于更新授权账户。

@M3chD09
Copy link
Owner

M3chD09 commented Feb 2, 2023

这样设计可以使得系统在一次授权完成后就进入关闭状态,也是为了可能的安全问题考虑。我不太确定是否有这样或类似情况的可能:其他人访问这个页面,授权自己的账户并替换了原来的账户。
如果要重新授权,可以在Cloudflare的Workers KV设置中对应的命名空间删除refresh_token。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants