I am using my google account to authenticate on my Kentico website.
Initially, my Google account was added was by using:
userCreation = await _userManager.CreateExternalUser(loginInfo);
I would like now to prevent the automatic creation of users to avoid having people from the outside creating new users and therefore disable the CreateExternalUser() function.
I then tried to create new external user in the "Users" app in the admin website. To do so, I didn't provide any password and I marked the new user as an external user.
When I try
signInResult = await _signInManager.ExternalLoginSignInAsync(loginInfo.LoginProvider, loginInfo.ProviderKey, isPersistent: false);
I always get a failed result.
I checked the tables (CMS.User) and the user created by CreateExternalUser and the user created by hand in the admin site look identical.
I did step by step for _signInManager.ExternalLoginSignInAsync(loginInfo.LoginProvider, loginInfo.ProviderKey, isPersistent: false); and the loginProvider (Google) and the Providerkey (1182704....61480) are also identical between the 2 users.
Why the external user created by hand return a failed result while when it is created by CreateExternalUser with the same info it works fine?
I am using Kentico 13.0.79.