diff --git a/src/EthernaSSO/Configs/Identity/UserStore.cs b/src/EthernaSSO/Configs/Identity/UserStore.cs index 5a92417..4d8f0ab 100644 --- a/src/EthernaSSO/Configs/Identity/UserStore.cs +++ b/src/EthernaSSO/Configs/Identity/UserStore.cs @@ -483,7 +483,11 @@ public Task SetUserNameAsync(UserBase user, string? userName, CancellationToken [SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "External library doesn't declare exceptions")] public async Task UpdateAsync(UserBase user, CancellationToken cancellationToken) { - try { await ssoDbContext.Users.ReplaceAsync(user, cancellationToken: cancellationToken); } + try + { + //update both UserBase and UserSharedInfo + await ssoDbContext.SaveChangesAsync(cancellationToken); + } catch { return IdentityResult.Failed(); } return IdentityResult.Success; } diff --git a/src/EthernaSSO/Startup.cs b/src/EthernaSSO/Startup.cs index 8b53ac4..48e8e47 100644 --- a/src/EthernaSSO/Startup.cs +++ b/src/EthernaSSO/Startup.cs @@ -293,6 +293,7 @@ static Task unauthorizedApiCallHandler(RedirectContext { + options.Authentication.CookieAuthenticationScheme = IdentityConstants.ApplicationScheme; options.LicenseKey = Configuration["IdServer:LicenseKey"]; //can be null in dev env options.UserInteraction.ErrorUrl = "/Error"; })