mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
feat: add Bilibili OAuth (#720)
* implemented bilibili oauth * add bilibili oauth * add document address * add frontend page * uncheck
This commit is contained in:
@ -114,6 +114,9 @@ const authInfo = {
|
||||
Custom: {
|
||||
endpoint: "https://example.com/",
|
||||
},
|
||||
Bilibili: {
|
||||
endpoint: "https://passport.bilibili.com/register/pc_oauth2.html"
|
||||
}
|
||||
};
|
||||
|
||||
export function getProviderUrl(provider) {
|
||||
@ -238,5 +241,7 @@ export function getAuthUrl(application, provider, method) {
|
||||
return `${provider.domain}/v1/authorize?client_id=${provider.clientId}&redirect_uri=${redirectUri}&state=${state}&response_type=code&scope=${scope}`;
|
||||
} else if (provider.type === "Custom") {
|
||||
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`
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user