mirror of
https://github.com/ZeroCatDev/ClassworksKV.git
synced 2025-12-11 00:53:09 +00:00
Compare commits
No commits in common. "e73ff53f587234d27f2ecc5065e2144fb0eb1f4a" and "ddf001b1c188657d90bd4039a289c2da17ed20b9" have entirely different histories.
e73ff53f58
...
ddf001b1c1
@ -67,24 +67,6 @@ export const oauthProviders = {
|
|||||||
website: "https://houlang.cloud",
|
website: "https://houlang.cloud",
|
||||||
pkce: true, // 启用PKCE支持
|
pkce: true, // 启用PKCE支持
|
||||||
},
|
},
|
||||||
dlass: {
|
|
||||||
// Dlass(Casdoor)- 标准 OIDC Provider
|
|
||||||
clientId: process.env.DLASS_CLIENT_ID,
|
|
||||||
clientSecret: process.env.DLASS_CLIENT_SECRET,
|
|
||||||
// Casdoor 标准端点
|
|
||||||
authorizationURL: "https://auth.wiki.forum/login/oauth/authorize",
|
|
||||||
tokenURL: "https://auth.wiki.forum/api/login/oauth/access_token",
|
|
||||||
userInfoURL: "https://auth.wiki.forum/api/userinfo",
|
|
||||||
scope: "openid profile email offline_access",
|
|
||||||
// 展示相关
|
|
||||||
name: "dlass",
|
|
||||||
displayName: "Dlass 账户",
|
|
||||||
icon: "casdoor",
|
|
||||||
color: "#3498db",
|
|
||||||
description: "使用Dlass账户登录",
|
|
||||||
website: "https://dlass.tech",
|
|
||||||
tokenRequestFormat: "json", // Casdoor 推荐 JSON 提交
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取OAuth回调URL
|
// 获取OAuth回调URL
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ClassworksKV",
|
"name": "ClassworksKV",
|
||||||
"version": "1.3.6",
|
"version": "1.3.5",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node ./bin/www",
|
"start": "node ./bin/www",
|
||||||
|
|||||||
@ -282,14 +282,6 @@ router.get("/oauth/:provider/callback", async (req, res) => {
|
|||||||
name: userData.name || userData.preferred_username || userData.nickname,
|
name: userData.name || userData.preferred_username || userData.nickname,
|
||||||
avatarUrl: userData.picture,
|
avatarUrl: userData.picture,
|
||||||
};
|
};
|
||||||
} else if (provider === "dlass") {
|
|
||||||
// Dlass(Casdoor)标准OIDC用户信息
|
|
||||||
normalizedUser = {
|
|
||||||
providerId: userData.sub,
|
|
||||||
email: userData.email_verified ? userData.email : userData.email || null,
|
|
||||||
name: userData.name || userData.preferred_username || userData.nickname,
|
|
||||||
avatarUrl: userData.picture,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 名称为空时,用邮箱@前部分回填(若邮箱可用)
|
// 名称为空时,用邮箱@前部分回填(若邮箱可用)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user