use the official discord button on registration page as well

and disable the not yet approved external login providers on the registration page
This commit is contained in:
2024-01-21 15:25:37 +01:00
parent 8092210ec8
commit cc9a83607c
3 changed files with 22 additions and 2 deletions
@@ -115,6 +115,12 @@ namespace Kemkas.Web.Areas.Identity.Pages.Account
returnUrl ??= Url.Content("~/");
ExternalLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync()).ToList();
// Disable not yet approved external login providers in production
if (!_environment.IsDevelopment())
{
ExternalLogins = ExternalLogins.Where(el => el.Name == "Discord").ToList();
}
if (ModelState.IsValid)
{