From 9938d014a7b29dcad9f102417e4775d45771f6f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enes=20Sad=C4=B1k=20=C3=96zbek?= Date: Sat, 24 Aug 2019 16:29:18 +0300 Subject: [PATCH] Remove UserValidators before creating account We do not need to check if the username etc is valid. Steam usernames can contain spaces, UTF8 characters, etc. --- src/ExternalLoginController.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ExternalLoginController.cs b/src/ExternalLoginController.cs index e6e04f7..aaba2b2 100644 --- a/src/ExternalLoginController.cs +++ b/src/ExternalLoginController.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Security.Claims; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; @@ -66,6 +67,8 @@ namespace SteamOpenIdConnectProxy var userId = info.Principal.FindFirstValue(ClaimTypes.NameIdentifier); var user = new IdentityUser { UserName = userName, Id = userId }; + + _userManager.UserValidators.Clear(); var result = await _userManager.CreateAsync(user); if (result.Succeeded) {