[Bug] 重定向 URI:http://myip:3210/api/auth/callback/casdoor在许可跳转列表中未找到 #6064
-
📦 部署环境Docker 📌 软件版本latest 💻 系统环境Ubuntu 🌐 浏览器Firefox 🐛 问题描述根据docs使用docker compose部署,尝试登录后提示: 📷 复现步骤部署过程: 尝试登录myip:3210,点击左上角登录,提示 参考https://lobehub.com/docs/self-hosting/advanced/auth/next-auth/casdoor 🚦 期望结果感觉是否是文档内容没有更新?希望完善一下文档相关内容。 📝 补充信息No response |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments 1 reply
-
📦 Deployment environmentDocker 📌 Software versionlatest 💻 System environmentUbuntu 🌐 BrowserFirefox 🐛 Problem descriptionAccording to the docs, docker compose is used to deploy. After trying to log in, it prompts: 📷 Steps to reproduceDeployment process:
Try to log in to myip:3210, click on the upper left corner to log in, and the prompt Reference https://lobehub.com/docs/self-hosting/advanced/auth/next-auth/casdoor 🚦 Expected resultsDoes it feel like the document content has not been updated? I hope to improve the relevant content of the document. 📝 Supplementary informationNo response |
Beta Was this translation helpful? Give feedback.
-
👀 @Ekreke Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
Beta Was this translation helpful? Give feedback.
-
Hey, @Ekreke! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together! 要解决在使用 Docker 在 Ubuntu 上部署 LobeChat 时遇到的重定向 URI 问题,请确保在 Casdoor 应用程序设置中正确配置了重定向 URI。根据最新的文档,您应该:
确保您使用的重定向 URI 与这些配置之一匹配。如果不匹配,请将正确的 URI 添加到 Casdoor 应用程序设置中的允许重定向 URL 列表中。此外,确保您已将 To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
参考这个在casdoor里设置重定向URL |
Beta Was this translation helpful? Give feedback.
-
我使用公网ip进行部署,必须事先配置好路由吗? |
Beta Was this translation helpful? Give feedback.
-
部署完成后再进入casdoor里面添加一个重定向URL就行 |
Beta Was this translation helpful? Give feedback.
-
目前我疑问的点就在这里,我自己服务器有一个公网ip,我根据部署教程新增了一个重定向URL为https://{我的公网ip}/api/auth/callback/casdoor后并保存。进入3210端口后点击登录。提示:http://{我的公网ip}:3210/api/auth/callback/casdoor在许可跳转列表中未找到。如果我直接访问https://{我的公网ip}/api/auth/callback/casdoor,显示报错。但是官网教程并没有对配置casdoor这一步骤有详细的描述。这里是否有其他需要配置的点呢?辛苦解答一下。 |
Beta Was this translation helpful? Give feedback.
-
重定向URL设置成 http:// 试试 |
Beta Was this translation helpful? Give feedback.
-
From what I can gather using translate, I ran into this the past day or two as well. I found that while the database and lobechat containers persist their user data between docker compose up -d, docker compose down, docker compose up -d, the casdoor container does not persist and the change from localhost to IP address gets reverted back to localhost. The only difference I saw between my situation and Ekreke is I did not create a new entry in Casdoor but instead edited the existing callback URL (making sure to click save & exit.) I made the same changes to my docker compose yaml. Each time I run docker compose up -d, I log into Casdoor and update the callback URL from localhost to IP address, and then am able to log into lobeChat. Finally, I hope I'm doing this translation right, apologies in advance: 根据我这几天的观察,我也遇到了这个问题。 我发现虽然数据库和lobeChat容器在执行docker compose up -d、docker compose down、再执行docker compose up -d时能够保持用户数据,但casdoor容器却无法保持,且从localhost更改为IP地址的设置会被还原回localhost。 我注意到我和Ekreke的情况之间唯一的区别是,我没有在Casdoor中创建新的条目(确保点击保存并退出。)而是编辑了现有的回调URL。我对我的docker compose yaml文件做了相同的更改。 每次我运行docker compose up -d时,我都会登录Casdoor并将回调URL从localhost更新为IP地址,然后就能够登录lobeChat。 |
Beta Was this translation helpful? Give feedback.
-
这两种方式都尝试过 ,还是没有解决呢。期待一下后期文档完善了。 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
If the protocol of |
Beta Was this translation helpful? Give feedback.
.env
中的AUTH_URL
的协议是http
的话,那 casdoor 的回调url的协议也要对应。