mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-10-09 14:01:08 +02:00
identity: better handling of unregistered users
This commit is contained in:
1 parent
f2ee766b09
commit
a14ccfadce
2 files changed
+35
-1
No files matched your search
@@ -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