mirror of
https://github.com/morbalint/kemkas.git
synced 2026-07-18 03:13:46 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user