Mohi
✅ jwt token
Thanks for answering @✿ Scarlet ✿ , actually I already define UseCors and it is woking on other endpoints which don't have Authorize tag before them
services.AddCors(options =>
{
options.AddPolicy(
"AllowSpecificOrigins",
builder =>
{
var corsOrigins = configuration
.GetSection("CORS:AllowedOrigins")
.Get<string[]>();
if (corsOrigins is null || corsOrigins.Length == 0)
{
throw new InvalidOperationException(
"CORS:AllowedOrigins is not configured properly."
);
}
builder
.WithOrigins(corsOrigins)
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials();
}
);
});
26 replies
❔ JWT token claims not working anymore after deploying application to Azure web app.
Hi there, facing the same problem, everything works fine on dev server but when depoly on Azure on test env, recieve CORS errors on the endpoints of controllers used
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
won't work anymore. Is there any updates?3 replies