The reason that you are getting this error is that CORS is not supported at the OAuth 2.0 authorization endpoint. This API is not designed to be called programmatically (for example using xhr
or fetch
request from Javascript) but only using browser navigation, normally through a redirect.
The general flow is as follows:
- Your app performs a browser redirect to
https://login.mysocialpulse.com/authorize
. - Auth0 will create an authorization code and redirect to
https://mysocialpulse.com/login/oauth2/code/shinyproxy
. - From that page you may then perform a CORS request to
https://login.mysocialpulse.com/oauth/token
to perform the code exchange.
Hope this helps.