Skip to content

Commit

Permalink
fix(server): recover faster when IdSrv isn't reachable
Browse files Browse the repository at this point in the history
  • Loading branch information
gingters authored and thomashilzendegen committed Aug 22, 2023
1 parent 33f036b commit 63ba5ec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/docker/Thinktecture.Relay.Server.Docker/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ public void ConfigureServices(IServiceCollection services)
options.Authority = authorityUri.AbsoluteUri;
options.Audience = Constants.AuthenticationAudience;
options.RequireHttpsMetadata = authorityUri.Scheme == "https";
// This is a demo environment, we should try to recover fast if we can't access our Identity Provider
// when fetching its OpenId configuration. Otherwise we would stay in failed state in the MS JwtBearer
// ConfigurationManager until its default refresh interval of 5 minutes passed.
options.RefreshInterval = TimeSpan.FromSeconds(15);
});

services.AddRelayServerDbContext(Configuration.GetConnectionString("PostgreSql")
Expand Down

0 comments on commit 63ba5ec

Please sign in to comment.