Skip to content

Commit

Permalink
Update error message for longer key requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec committed Mar 22, 2024
1 parent 73dd492 commit 302ab55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Backend/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public void ConfigureServices(IServiceCollection services)
const string secretKeyEnvName = "COMBINE_JWT_SECRET_KEY";
var secretKey = Environment.GetEnvironmentVariable(secretKeyEnvName);

// The JWT key size must be at least 128 bits long.
const int minKeyLength = 128 / 8;
// The JWT key size must be at least 256 bits long.
const int minKeyLength = 256 / 8;
if (secretKey is null || secretKey.Length < minKeyLength)
{
_logger.LogError("Must set {EnvName} environment variable to string of length {MinLength} or longer.",
Expand Down

0 comments on commit 302ab55

Please sign in to comment.