Lately Github updated the Oauth apis and documentation. I am unable to get the access_token from this api
POST https://github.com/login/oauth/access_token ( I am always receving CORS error in production server)
I have tried both post calls passing correct client_id, client_secret and the code as url param as well as as payload
I have no problem receiving code from the /authorize endpoint and I am using this code in above as described in the documentation.
https://github.com/login/oauth/authorize?client_id=${environment.client_id}
Then you're doing the POST from a browser, which is a serious error. You cannot do that. The POST happens from your server, to Github's server. As it stands, you're exposing your
client_secretto the browser which is a serious security problem.