Ideal Solution
Your server should enable the cross origin requests and not the client. To do this, you can check this cool link with implementations and configurations for multiple platforms
Front-end fix to try
var config = {
headers: {'Access-Control-Allow-Origin': '*'}
};
axios.get(
"https://github.com/login/oauth/authorize?client_id={ID}, config"
);
Quick Temporary fix for development
Add this chrome extension to your chrome browser and turn it on. There won't be any cors issue but it is not a permanent fix.