Getting CORS error after authenticating in swagger

We are enabling authenticating in swagger build in NSwag (.NET Core), but we are getting following error

“Access to fetch at ‘https://myOcta.com/auth2/default/v1/token’ from origin ‘https://localhost:5008’ 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.”

We have enabled CORS for ‘https://localhost:5008’ URL in OCTS but still facing same issue.

Please help to resolve this issue

Can you confirm if this call was made from .NET backend and also can you share the sample example curl of your request coming from your front end and .net service? and what is added to the trusted origins?

Please omit any info such as access tokens or codes.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.