mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
feat: add Line support as OAuth 3rd-party login (#1413)
This commit is contained in:
@ -121,6 +121,10 @@ const authInfo = {
|
||||
Bilibili: {
|
||||
endpoint: "https://passport.bilibili.com/register/pc_oauth2.html",
|
||||
},
|
||||
Line: {
|
||||
scope: "profile%20openid%20email",
|
||||
endpoint: "https://access.line.me/oauth2/v2.1/authorize",
|
||||
},
|
||||
};
|
||||
|
||||
export function getProviderUrl(provider) {
|
||||
@ -256,5 +260,7 @@ export function getAuthUrl(application, provider, method) {
|
||||
return `${provider.customAuthUrl}?client_id=${provider.clientId}&redirect_uri=${redirectUri}&scope=${provider.customScope}&response_type=code&state=${state}`;
|
||||
} else if (provider.type === "Bilibili") {
|
||||
return `${endpoint}#/?client_id=${provider.clientId}&return_url=${redirectUri}&state=${state}&response_type=code`;
|
||||
} else if (provider.type === "Line") {
|
||||
return `${endpoint}?client_id=${provider.clientId}&redirect_uri=${redirectUri}&state=${state}&response_type=code&scope=${scope}`;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user