This commit is contained in:
Kieran
2023-10-13 21:46:00 +01:00
parent 6f28c3f293
commit ef4ca27f4b
8 changed files with 373 additions and 281 deletions

View File

@@ -95,7 +95,7 @@ public class UserManager
}
var uid = await _store.LookupUser(user.Email);
if (uid.HasValue)
if (uid.HasValue && uid.Value != Guid.Empty)
{
var existingUser = await _store.Get(uid.Value);
if (existingUser?.AuthType == UserAuthType.OAuth2)
@@ -119,7 +119,7 @@ public class UserManager
public async ValueTask<User> LoginOrRegister(string pubkey)
{
var uid = await _store.LookupUser(pubkey);
if (uid.HasValue)
if (uid.HasValue && uid.Value != Guid.Empty)
{
var existingUser = await _store.Get(uid.Value);
if (existingUser?.AuthType == UserAuthType.Nostr)