mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-08-23 08:47:29 +02:00
identity: better handling of unregistered users
This commit is contained in:
@@ -63,7 +63,8 @@ namespace Streetwriters.Identity.Validation
|
||||
public async Task ValidateAsync(ExtensionGrantValidationContext context)
|
||||
{
|
||||
var email = context.Request.Raw["email"];
|
||||
var user = await UserManager.FindByEmailAsync(email);
|
||||
var clientId = context.Request.ClientId;
|
||||
var user = await UserManager.FindRegisteredUserAsync(email, clientId);
|
||||
if (user == null)
|
||||
{
|
||||
user = new User
|
||||
|
||||
Reference in New Issue
Block a user