I am getting CORS issue from sharepoint site using Jquery. Below i have mention the code i am using to access okta api. I have enabled CORS origin in OKTA API for my Origin URL
Does the URL for the CORS error look something like https://**.oktapreview.com/oauth2/default/api/v1/authn or does it look like https://**.oktapreview.com/api/v1/authn?
Can you update your ‘url’ to https://**.oktapreview.com? This value should match your Okta domain, not the Authorization Server/Issuer you are trying to use.
thank you for your reply, it help me to resolve my issue. but i am facing one more issue now, hope if you can help me on this.
I don’t want to use redirect in the api call, is it possible to write API Call without passing redirect URL to get token from okta
Most of the OIDC/OAuth flows involve a browser redirect, but you might want to check out Client Credentials flow (used by machine-to-machine integrations to request tokens with a single back-end call): Implement authorization by grant type | Okta Developer
Is this for a machine-to-machine integration, testing, or to get actual user-scoped tokens?