Why am I getting a CORS error calling the /v1/authorize
end point when I have added localhost to Trusted Origins? I only seem to be able to get this to work when I put the URL together with query params and call it directly in the browser.
const result = await axios({
method: "Post",
headers: {
'Content-Type': 'text/plain',
'Access-Control-Allow-Origin': '*'
},
url: 'https://dev-123456.okta.com/oauth2/v1/authorize',
data: {
client_id: 'client_id_added_here',
response_type: 'id_token',
scope: 'openid%20groups',
redirect_uri: 'http://localhost:3000/auth',
state: 'myState',
nonce: 'myNonceValue'
}
})
Security > API > Trusted Origins: