mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
Fix bug in isProviderVisible().
This commit is contained in:
@ -43,14 +43,18 @@ export function isProviderVisible(providerItem) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (providerItem.provider.type !== "GitHub") {
|
||||
return true;
|
||||
if (providerItem.provider.category !== "OAuth") {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isLocalhost()) {
|
||||
return providerItem.provider.name.includes("localhost");
|
||||
if (providerItem.provider.type === "GitHub") {
|
||||
if (isLocalhost()) {
|
||||
return providerItem.provider.name.includes("localhost");
|
||||
} else {
|
||||
return !providerItem.provider.name.includes("localhost");
|
||||
}
|
||||
} else {
|
||||
return !providerItem.provider.name.includes("localhost");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user