the only stupidest problem was that I had written UseCors() after UseAuthentication() and UseAuthorization() methods and after I changed the order like this in config files everything was fixed. I almost waste 2 days for this problem. which was of course my fault.
app.UseCors("AllowSpecificOrigins");
app.UseAuthentication();
app.UseAuthorization();