Shiro icon indicating copy to clipboard operation
Shiro copied to clipboard

前端登錄後導回後端 "Cannot GET /"

Open seriaati opened this issue 6 months ago • 5 comments

Describe the bug

設置了 GitHub Oauth 登錄。 Mix Space 可以正常使用 GitHub 登錄。 前端 (https://www.seria.moe) 登錄後會被重新導向至 https://mx-space.seria.moe/

網站設置:

Image

看過了後端日誌,沒有任何有問題的條目。

Reproduction

  1. 設置好 GitHub Oauth
  2. 前往前端
  3. 按右上角登錄按鈕
  4. 選擇 GitHub
  5. 登錄完成後會被重新導向至 https://mx-space.seria.moe
  6. 觸發 "Cannot GET /" 錯誤

Validations

  • [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • [x] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • [x] The provided reproduction is a minimal reproducible of the bug.

seriaati avatar Jun 26 '25 10:06 seriaati

Image

这个很奇怪了,需要你、抓一下这个接口的 callbackURL 是什么

这个接口在登录的时候会触发

Image

Innei avatar Jun 28 '25 11:06 Innei

有點意思,並沒有發送 callbackURL

Image

seriaati avatar Jun 29 '25 00:06 seriaati

Mix Space 版本: 面板版本: 4.9.0 系统版本:8.3.2

seriaati avatar Jun 29 '25 00:06 seriaati

我升级下 better-auth ,你再试试?

Innei avatar Jul 03 '25 08:07 Innei

確實會發送 callbackURL 了

Image

然而被重新導回到前端後,登入狀態沒有變化,仍然還是未登入的狀態,重新整理網頁也一樣

GitHub 授權後:

Image

返回到 Mix Space:

Image

後端日誌沒有看到任何錯誤

seriaati avatar Jul 03 '25 10:07 seriaati