Skip to content

Commit

Permalink
Update error message for longer key requirement (#3013)
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec authored Mar 25, 2024
1 parent e79ca3a commit 1d0ca5c
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 1d0ca5c

Please sign in to comment.