A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hello everyone, English is not my native language so please be kind 😉
I am building an external Shopify application. I have a register menu that when I click on register button should send a get request to my server on ('/auth?shop=myShopName.myshopify.com) and then on this, the authentification will begin with beginAuth Shopify api method. At the end of the method, I have a res.redirect to the link returned by beginAuh which is (https://myShopName.myshopify.com/admin/oath/authorize?client_id=*******&scope=write_products%2Cwrite...) but I get a CORS error :
```
Access to fetch at 'https://myShopName.myshopify.com/admin/oath/authorize?client_id=*******&scope=write_products%2Cwrite...' (redirected from 'http://localhost:3000/auth?shop=myShopName.myshopify.com') from origin 'http://localhost:3000' 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.
```
What can I do to solve this? Thanks all!
Hi – I think my team is having a similar issue. Were you able to solve this?
Hey, I just added 'method' : 'no-cors' in my request options.