Commit 158ba841 authored by Eric Dieckman's avatar Eric Dieckman
Browse files

Fix login logic

parent 8b30b5ed
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -170,9 +170,13 @@ public static class AuthenticationServiceExtensions
        // Look up the internal user
        AppUser? user = await userRepository.GetByUniqueIdAsync(oidcIdentity.Pvi);

        if (user == null)
        {
            // If user does not exist, create it
            user ??= oidcIdentity.ToAppUser();

            await userRepository.AddAsync(user).ConfigureAwait(false);
        }

        // Add the app-specific internal user id claim
        if (user.AppUserId.HasValue)