mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
fix: use new dingtalk api and support qrcode method (#486)
Signed-off-by: Steve0x2a <stevesough@gmail.com>
This commit is contained in:
@ -41,8 +41,8 @@ const authInfo = {
|
||||
endpoint: "https://www.facebook.com/dialog/oauth",
|
||||
},
|
||||
DingTalk: {
|
||||
scope: "snsapi_login",
|
||||
endpoint: "https://oapi.dingtalk.com/connect/oauth2/sns_authorize",
|
||||
scope: "openid",
|
||||
endpoint: "https://login.dingtalk.com/oauth2/auth",
|
||||
},
|
||||
Weibo: {
|
||||
scope: "email",
|
||||
@ -230,7 +230,7 @@ export function getAuthUrl(application, provider, method) {
|
||||
} else if (provider.type === "Facebook") {
|
||||
return `${endpoint}?client_id=${provider.clientId}&redirect_uri=${redirectUri}&scope=${scope}&response_type=code&state=${state}`;
|
||||
} else if (provider.type === "DingTalk") {
|
||||
return `${endpoint}?appid=${provider.clientId}&redirect_uri=${redirectUri}&scope=${scope}&response_type=code&state=${state}`;
|
||||
return `${endpoint}?client_id=${provider.clientId}&redirect_uri=${redirectUri}&scope=${scope}&response_type=code&state=${state}&prompt=consent`;
|
||||
} else if (provider.type === "Weibo") {
|
||||
return `${endpoint}?client_id=${provider.clientId}&redirect_uri=${redirectUri}&scope=${scope}&response_type=code&state=${state}`;
|
||||
} else if (provider.type === "Gitee") {
|
||||
|
Reference in New Issue
Block a user