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

更新最新版OAuth失效 #2247

Open
5 tasks done
jiuyue52 opened this issue Nov 27, 2024 · 20 comments
Open
5 tasks done

更新最新版OAuth失效 #2247

jiuyue52 opened this issue Nov 27, 2024 · 20 comments

Comments

@jiuyue52
Copy link

Describe the bug

佬,后端点验证报错403,429,前端登录报redirect_uri;是需要等后续更新,还是需要重新设置些什么?
Callback URL填的是https://mx.vlo.cc/api/v2/auth/callback/github,更新前是没问题的

image

Reproduction

后端验证403

System Info

System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (4) x64 AMD EPYC 7402 24-Core Processor
    Memory: 5.94 GB / 7.75 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v20.12.2/bin/yarn
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
    pnpm: 9.13.2 - ~/.nvm/versions/node/v20.12.2/bin/pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
Copy link

linear bot commented Nov 27, 2024

@jiuyue52
Copy link
Author

更新到Core 7.2.3依旧报403

@jiuyue52
Copy link
Author

使用的远程redis/mongodb;redis:7.4.1,mongodb:7.0.15

@sorrow233
Copy link

我也是一样,之前可以用密码登陆前端,现在连前端都没法登陆了喵。你是怎么回退的

@jiuyue52
Copy link
Author

jiuyue52 commented Dec 1, 2024

我也是一样,之前可以用密码登陆前端,现在连前端都没法登陆了喵。你是怎么回退的

后端回退的话直接在docker-compose.yml改版本号比如latest>7.1.9,前端的话我没回退过

@Innei
Copy link
Member

Innei commented Dec 1, 2024

报错信息是什么

@jiuyue52
Copy link
Author

jiuyue52 commented Dec 1, 2024

报错信息是什么
image

image

@jiuyue52
Copy link
Author

jiuyue52 commented Dec 1, 2024

这是需要在core的docker-compose中添加mx.vlo.cc么?还是在哪设置🤔

image

@sorrow233

This comment was marked as outdated.

@jiuyue52
Copy link
Author

jiuyue52 commented Dec 1, 2024

这是需要在core的docker-compose中添加mx.vlo.cc么?还是在哪设置🤔

还真是,在 ALLOWED_ORIGINS 添加上后端域名后,不报403了,但是又报redirect_uri了🤔,应用程序回调地址配的https

@sorrow233

This comment was marked as spam.

@Innei
Copy link
Member

Innei commented Dec 1, 2024

在 ALLOWED_ORIGINS 添加上后端域名后,不报403了

你是对的。确实是因为ALLOWED_ORIGINS的原因返回403。github中redirect_uri需要填http才行,但依旧不能正常鉴权,返回的错误是。GPT说是因为 //fn 这里有两个斜杠,你有什么头绪优化吗

19:31:06  WARN   [AllExceptionsFilter]  IP: ***.***.***.*** 错误信息:(404) Cannot POST /api/v2//fn/ps/update Path: /api/v2//fn/ps/update
19:31:10  WARN   [AllExceptionsFilter]  IP: ***.***.***.*** 错误信息:(404) Cannot POST /api/v2//fn/ps/update Path: /api/v2//fn/ps/update
19:31:17  WARN   [AllExceptionsFilter]  IP: ***.***.***.*** 错误信息:(404) Cannot POST /api/v2//fn/ps/update Path: /api/v2//fn/ps/update
19:31:22  WARN   [AllExceptionsFilter]  IP: ***.***.***.*** 错误信息:(404) Cannot POST /api/v2//fn/ps/update Path: /api/v2//fn/ps/update
19:31:34  WARN   [AllExceptionsFilter]  IP: ***.***.***.*** 错误信息:(404) Cannot POST /api/v2//fn/ps/update Path: /api/v2//fn/ps/update

env 里面 api-url 不要带尾斜杠

@jiuyue52
Copy link
Author

jiuyue52 commented Dec 1, 2024

env 里面 api-url 不要带尾斜杠

佬,现在报redirect_uri有什么办法没,nginx配置感觉没问题(因为老版本是可用的🥹)

@Innei
Copy link
Member

Innei commented Dec 1, 2024

env 里面 api-url 不要带尾斜杠

佬,现在报redirect_uri有什么办法没,nginx配置感觉没问题(因为老版本是可用的🥹)

都填 http

@jiuyue52
Copy link
Author

jiuyue52 commented Dec 1, 2024

都填 http

google的正式版只能https, 让他一直停在测试版就行么

@sorrow233
Copy link

sorrow233 commented Dec 1, 2024

不是因为这个,因为你的网站也会报这个错(

@Innei
Copy link
Member

Innei commented Dec 1, 2024

都填 http

google的正式版只能https, 让他一直停在测试版就行么

CleanShot 2024-12-01 at 9  34 03@2x

@Innei
Copy link
Member

Innei commented Dec 1, 2024

在 ALLOWED_ORIGINS 添加上后端域名后,不报403了

你是对的。确实是因为ALLOWED_ORIGINS的原因返回403。github中redirect_uri需要填http才行,但依旧不能正常鉴权,返回的错误是。GPT说是因为 //fn 这里有两个斜杠,你有什么头绪优化吗

19:31:06  WARN   [AllExceptionsFilter]  IP: ***.***.***.*** 错误信息:(404) Cannot POST /api/v2//fn/ps/update Path: /api/v2//fn/ps/update
19:31:10  WARN   [AllExceptionsFilter]  IP: ***.***.***.*** 错误信息:(404) Cannot POST /api/v2//fn/ps/update Path: /api/v2//fn/ps/update
19:31:17  WARN   [AllExceptionsFilter]  IP: ***.***.***.*** 错误信息:(404) Cannot POST /api/v2//fn/ps/update Path: /api/v2//fn/ps/update
19:31:22  WARN   [AllExceptionsFilter]  IP: ***.***.***.*** 错误信息:(404) Cannot POST /api/v2//fn/ps/update Path: /api/v2//fn/ps/update
19:31:34  WARN   [AllExceptionsFilter]  IP: ***.***.***.*** 错误信息:(404) Cannot POST /api/v2//fn/ps/update Path: /api/v2//fn/ps/update

env 里面 api-url 不要带尾斜杠

这个应该是你用的上报程序的 api url 有尾随/

@jiuyue52
Copy link
Author

jiuyue52 commented Dec 1, 2024

CleanShot 2024-12-01 at 9  34 03@2x

已获授权的 JavaScript 来源 和 已获授权的重定向 URI,这两个只要有http就只能这样,虽然能用来着0.0(

image
image

@sorrow233
Copy link

sorrow233 commented Dec 1, 2024

这个应该是你用的上报程序的 api url 有尾随/

更邪门了,后端Google和GitHub都成功了,前端依旧闪一下,返回200,甚至后端已经显示了新读者,但还是没登录上,很大概率vercel的问题吧?已老实

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

3 participants