gitstars icon indicating copy to clipboard operation
gitstars copied to clipboard

使用 cloudflare workers 部署 /api/oauth/access_token 异常

Open yz0812 opened this issue 1 year ago • 1 comments

1. 已创建Application并且已绑定域名 https://gitstars.wuc0714.top/

image

2. cloudflare 构建成功

image

3. 页面报错,求大佬指点

image image

yz0812 avatar Dec 30 '24 07:12 yz0812

我也一样. src\components\unauth.vue
line30:const authURL = https://github.com/login/oauth/authorize?client_id=${import.meta.env.VITE_GITSTARS_CLIENT_ID}&redirect_uri=${location.origin}&scope=public_repo; 已经不适合现在的认证路径了,这个改成: const authURL = https://github.com/login/oauth/authorize?client_id=${import.meta.env.VITE_GITSTARS_CLIENT_ID}&redirect=${location.origin}&scope=public_repo; 这样能打开github.com认证页面了。

结果认证回来后,程序一直转圈圈,不能处理github认证回来的响应。 查看 vite.config.js line 35 ,config.server 里面的target: envLocal.VITE_API_PROXY。 这个VITE_API_PROXY是什么鬼,只出现在代码里,什么都没说这个值是什么。

hxsam avatar Jun 12 '25 05:06 hxsam