Low numbers to test autorenew
Docker Build and Release Upload / build (push) Successful in 1m22s

This commit is contained in:
2025-09-22 18:31:07 -07:00
parent 56e2391204
commit 3fcfca40a8
2 changed files with 14 additions and 4 deletions
+13 -3
View File
@@ -69,9 +69,19 @@ builder.Services.AddAuthentication(options => {
};
});
builder.Services.AddCors(o => o.AddDefaultPolicy(builder => {
builder.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader(); // No CORS
}));
List<string> allowedOrigins = new List<string>{ "https://auth.mistox.com" };
if (builder.Environment.IsDevelopment()) {
allowedOrigins.Add("http://localhost:5000");
}
builder.Services.AddCors(options => {
options.AddDefaultPolicy(policy => {
policy.WithOrigins(allowedOrigins.ToArray())
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
});
// Pages Service
builder.Services.AddControllers();
+1 -1
View File
@@ -37,7 +37,7 @@ namespace Auth.Services {
new Claim(ClaimTypes.Dns, RequestedSite),
new Claim(ClaimTypes.IsPersistent, StayLoggedIn.ToString()),
]),
Expires = DateTime.UtcNow.AddDays(7),
Expires = DateTime.UtcNow.AddMinutes(5),
IssuedAt = DateTime.UtcNow,
SigningCredentials = new SigningCredentials(RsaPrivateKey, SecurityAlgorithms.RsaSha256),
Audience = TokenAudience,