Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

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

Open
inertia666 opened this issue Nov 25, 2021 · 1 comment
Open

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

inertia666 opened this issue Nov 25, 2021 · 1 comment
Assignees

Comments

@inertia666
Copy link

inertia666 commented Nov 25, 2021

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)

@inertia666 inertia666 changed the title AADSTS9002326: Cross-origin token redemption is permitted only for the 'Single-Page Application 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) Nov 25, 2021
@inertia666 inertia666 changed the title 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) Cross-Origin Request Blocked: Problem with browser security Nov 25, 2021
@MikaBerglund MikaBerglund self-assigned this Jan 14, 2022
@MikaBerglund
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants