Blazorade / Blazorade-MSAL

A Blazor component library that makes it easy to use authentication in your application through MSAL, both in Blazor Server and Blazor WebAssembly applications.
MIT License
17 stars 5 forks source link

Cross-Origin Request Blocked: Problem with browser security #16

Open inertia666 opened 3 years ago

inertia666 commented 3 years ago

I cannot authenticate using the BlazorServer example app (Net Core 6.0) without using a browser plugin to disable the CORS policy.

Adding a policy in the app does not help either.:

    options.AddPolicy("CorsPolicy", builder =>
     builder.AllowAnyOrigin()
            .AllowAnyMethod()
            .AllowAnyHeader());

Please advise how I can get this to work without an addon in the browser.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://login.microsoftonline.com/74c901f0-6a97-4cfa-8505-9542ce009b27/oauth2/v2.0/token. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)

MikaBerglund commented 2 years ago

I'll have a look at this and see whether .NET6 has changed something.