I am trying to send an authentication request to Login to Spotify.
This is run through local host by a javascript XMLHttpRequest. However all I ever receive is an error message stating:
XMLHttpRequest cannot load https://accounts.spotify.com/authorize/?q=undefined&type=code&client_id=9f5…ope=user-read-private%20user-read-email%20streaming&state=iKX8sdHHEML6BxRy.
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin "localhost" is therefore not allowed access."
I tried setting the header doing xmlrequest.setRequestHeader("Access-Control-Allow-Origin", "*");
however this did not work.