Testeo de Key directa en json.
Some checks failed
Build and Deploy / remote-build-and-deploy (push) Failing after 15s

This commit is contained in:
2025-06-17 22:58:20 -03:00
parent c7d75ce76d
commit 29ba94e425
3 changed files with 15 additions and 28 deletions

View File

@@ -98,7 +98,8 @@ var jwtSettings = builder.Configuration.GetSection("Jwt");
// Le decimos que busque la clave JWT en la raíz de la configuración (donde están las variables de entorno).
// Si no la encuentra, como respaldo, busca en la sección "Jwt" del appsettings.
var jwtKey = builder.Configuration["JWT_KEY"] ?? jwtSettings["Key"] ?? throw new ArgumentNullException("JWT_KEY or Jwt:Key not configured");
//var jwtKey = builder.Configuration["JWT_KEY"] ?? jwtSettings["Key"] ?? throw new ArgumentNullException("JWT_KEY or Jwt:Key not configured");
var jwtKey = jwtSettings["Key"] ?? throw new ArgumentNullException("Jwt:Key", "JWT Key not configured in appsettings.json");
var keyBytes = Encoding.ASCII.GetBytes(jwtKey);