mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-13 19:20:04 +00:00
🔨 chore: Migrate self-hosting auth to Casdoor@v2 (#8767)
* 🔨 chore: update casdoor to v2 * 🐛 fix: enable signin * 🐛 fix: webhook hostname diag failed
This commit is contained in:
@@ -27,6 +27,7 @@ AUTH_CASDOOR_ISSUER=http://localhost:8000
|
||||
# Casdoor secret
|
||||
AUTH_CASDOOR_ID=a387a4892ee19b1a2249
|
||||
AUTH_CASDOOR_SECRET=dbf205949d704de81b0b5b3603174e23fbecc354
|
||||
CASDOOR_WEBHOOK_SECRET=casdoor-secret
|
||||
|
||||
# MinIO S3 configuration
|
||||
MINIO_ROOT_USER=admin
|
||||
|
||||
@@ -27,6 +27,7 @@ AUTH_CASDOOR_ISSUER=http://localhost:8000
|
||||
# Casdoor secret
|
||||
AUTH_CASDOOR_ID=a387a4892ee19b1a2249
|
||||
AUTH_CASDOOR_SECRET=dbf205949d704de81b0b5b3603174e23fbecc354
|
||||
CASDOOR_WEBHOOK_SECRET=casdoor-secret
|
||||
|
||||
# MinIO S3 配置
|
||||
MINIO_ROOT_USER=admin
|
||||
|
||||
@@ -60,7 +60,7 @@ services:
|
||||
|
||||
# version lock ref: https://github.com/lobehub/lobe-chat/pull/7331
|
||||
casdoor:
|
||||
image: casbin/casdoor:v1.843.0
|
||||
image: casbin/casdoor:v2.13.0
|
||||
container_name: lobe-casdoor
|
||||
entrypoint: /bin/sh -c './server --createDatabase=true'
|
||||
network_mode: 'service:network-service'
|
||||
|
||||
+1360
-854
File diff suppressed because it is too large
Load Diff
@@ -450,7 +450,7 @@ ENV_EXAMPLES=(
|
||||
"$SUB_DIR/.env.example"
|
||||
)
|
||||
# Default values
|
||||
CASDOOR_PASSWORD="123"
|
||||
CASDOOR_PASSWORD="pswd123"
|
||||
CASDOOR_SECRET="CASDOOR_SECRET"
|
||||
MINIO_ROOT_PASSWORD="YOUR_MINIO_PASSWORD"
|
||||
CASDOOR_HOST="localhost:8000"
|
||||
@@ -657,10 +657,10 @@ section_regenerate_secrets() {
|
||||
CASDOOR_PASSWORD=$(generate_key 10)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "CASDOOR_PASSWORD"
|
||||
CASDOOR_PASSWORD="123"
|
||||
CASDOOR_PASSWORD="pswd123"
|
||||
else
|
||||
# replace `password` in init_data.json
|
||||
sed "${SED_INPLACE_ARGS[@]}" "s/"123"/${CASDOOR_PASSWORD}/" init_data.json
|
||||
sed "${SED_INPLACE_ARGS[@]}" "s/"pswd123"/${CASDOOR_PASSWORD}/" init_data.json
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "CASDOOR_PASSWORD in \`init_data.json\`"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user