Hello!
I’m trying to do something, which i feel should be quite simple, but i can’t seem to get it right.
I’m simply trying to build a web api in asp.net core where i can access the name (email, age, etc.) of the current user using the claims in the User object in a Controller.
I have followed the quickstart guide called “ASP.NET Core v3.0: Login” after creating an app of the “Regular web app” type.
However, whenever i make a call to my API I get an error message saying
Access to fetch at 'https://dev-nlzfjvrr.eu.auth0.com/authorize?client_id=cemBpHXcYnTC*************&x-client-ver=5.5.0.0' (redirected from 'https://localhost:5001/Invoice') from origin 'https://localhost:5001' has been blocked by CORS policy:
Response to preflight request doesn`t pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
If an opaque response serves your needs, set the request`s mode to 'no-cors' to fetch the resource with CORS disabled.
I’ve added https://localhost:5001
to “Allowed Callback URLs” and “Allowed Web Origins”. I still doesn’t work.
Does anyone have any idea what might be causing this issue?