mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
@ -47,6 +47,10 @@ const GiteeAuthScope = "user_info,emails";
|
||||
const GiteeAuthUri = "https://gitee.com/oauth/authorize";
|
||||
const GiteeAuthLogo = `${StaticBaseUrl}/img/social_gitee.png`;
|
||||
|
||||
const LinkedInAuthScope = "r_liteprofile%20r_emailaddress";
|
||||
const LinkedInAuthUri = "https://www.linkedin.com/oauth/v2/authorization";
|
||||
const LinkedInAuthLogo = `${StaticBaseUrl}/img/social_linkedin.png`;
|
||||
|
||||
export function getAuthLogo(provider) {
|
||||
if (provider.type === "Google") {
|
||||
return GoogleAuthLogo;
|
||||
@ -64,6 +68,8 @@ export function getAuthLogo(provider) {
|
||||
return WeiboAuthLogo;
|
||||
} else if (provider.type === "Gitee") {
|
||||
return GiteeAuthLogo;
|
||||
} else if (provider.type === "LinkedIn") {
|
||||
return LinkedInAuthLogo;
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,5 +96,7 @@ export function getAuthUrl(application, provider, method) {
|
||||
return `${WeiboAuthUri}?client_id=${provider.clientId}&redirect_uri=${redirectUri}&scope=${WeiboAuthScope}&response_type=code&state=${state}`;
|
||||
} else if (provider.type === "Gitee") {
|
||||
return `${GiteeAuthUri}?client_id=${provider.clientId}&redirect_uri=${redirectUri}&scope=${GiteeAuthScope}&response_type=code&state=${state}`;
|
||||
} else if (provider.type === "LinkedIn") {
|
||||
return `${LinkedInAuthUri}?client_id=${provider.clientId}&redirect_uri=${redirectUri}&scope=${LinkedInAuthScope}&response_type=code&state=${state}`
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user