Skip to content

Commit

Permalink
merge hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm360 committed Jun 5, 2023
2 parents 41f23e4 + 447a866 commit 02c68a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/EthernaSSO/Configs/Identity/UserStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<IdentityResult> 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;
}
Expand Down
1 change: 1 addition & 0 deletions src/EthernaSSO/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ static Task unauthorizedApiCallHandler(RedirectContext<CookieAuthenticationOptio
var idServerConfig = new IdServerConfig(Configuration);
var builder = services.AddIdentityServer(options =>
{
options.Authentication.CookieAuthenticationScheme = IdentityConstants.ApplicationScheme;
options.LicenseKey = Configuration["IdServer:LicenseKey"]; //can be null in dev env
options.UserInteraction.ErrorUrl = "/Error";
})
Expand Down

0 comments on commit 02c68a7

Please sign in to comment.