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