Answer the question
In order to leave comments, you need to log in
How to get rid of CORS error on localhost when authorizing vk.api?
I use CRA. I want to log in to VK for further API work. I send a request via axios to ' https://oauth.vk.com... ', in response I get a CORS error. I understand that I should set 'Access-Control-Allow-Origin':'*' on the server, but I don't want to eject. I registered the VK domain, the Oauth domain in the proxy, but the error does not disappear. I don't understand much about servers.
Answer the question
In order to leave comments, you need to log in
I understand that I should set 'Access-Control-Allow-Origin':'*' on the server, but I don't want to eject.
To get an access_token , you need to make a request from your server to https: //oauth.vk.com/access_token, passing the following parameters:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question