mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 08:45:58 +03:00
[GH-ISSUE #584] casdoor登录报错 #6070
Labels
No labels
Q/A
bug
casdoor
dependencies
docker
documentation
duplicate
enhancement
help wanted
invalid
lego
platform:openwrt
platform:windows
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-ui#6070
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chung1912 on GitHub (Sep 27, 2024).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/584
2024-09-27 18:32:45 ERROR user/casdoor.go:52 json: cannot unmarshal object into Go struct field Claims.address of type []string
日志出现这个错误,怎么解决?
另外,环境变量NGINX_UI_CASDOOR_CERTIFICATE的值直接输入证书字符串也太长了,能不能支持读pem文件?直接映射这个文件来读取更方便些
@0xJacky commented on GitHub (Sep 28, 2024):
参考一下这个配置:https://github.com/0xJacky/nginx-ui/issues/423#issuecomment-2254904566
@chung1912 commented on GitHub (Sep 28, 2024):
我参考你这个配置的,帮忙看下是否有问题呢?docker-compose部署(证书太占地方了,我把证书处理成了一行,删除了换行符),可以正常跳转到casdoor,也能正常返回到login页面,但是会弹出如下错误提示:

ERROR user/casdoor.go:52 invalid key: Key must be a PEM encoded PKCS1 or PKCS8 key@0xJacky commented on GitHub (Sep 30, 2024):
换行符不能删的吧...,你可以映射配置文件进入容器,不一定用环境变量
@chung1912 commented on GitHub (Sep 30, 2024):
保留换行符,问题依旧
@0xJacky commented on GitHub (Oct 3, 2024):
花了点时间复现了一下,env 解析之后会把换行符替换为空格,所以证书就提示损坏了,这个问题是环境变量的锅,我计划在下个版本移除 app.ini 中直接配置证书内容的功能,改为在配置文件中设置证书的路径,到时候,可以直接把证书文件映射到容器内。
@0xJacky commented on GitHub (Oct 3, 2024):
临时的解决方案就是映射 app.ini 进容器,不使用 env
@chung1912 commented on GitHub (Oct 4, 2024):
是的,直接改为映射下载下来的pem证书文件,这样配置也方便,也不会出错
@0xJacky commented on GitHub (Oct 6, 2024):
已修复,将会在 beta.36 中发布。
@echoface commented on GitHub (Feb 9, 2025):
我这里报错 User not exist;
sso登录必须要求对应应用要注册一个admin的用户?
配置内容
@0xJacky @chung1912
@0xJacky commented on GitHub (Feb 9, 2025):
是的
@echoface commented on GitHub (Feb 10, 2025):
能否支持user 自动注册或者,配置中添加对应的配置项,比如allow_user_list 或者与casdoor交互的时候制定用户也行; 不然这个功能实现的比较奇怪; 和sso的实践规范相差很多