CORS error while calling OKTA logout API

I am using native Application for OKTA authentication. While I am trying to logout using api, getting below CORS error-

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://dev-213533.okta.com/oauth2/default/v1/logout?id_token_hint=token&post_logout_redirect_uri=http://admin.xxxxxxx.com/servlet/OKTALogout. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

I am using below url for logout-
https://dev-213533.okta.com/oauth2/default/v1/logout?id_token_hint=token&post_logout_redirect_uri=http://admin.xxxxxxx.com/servlet/OKTALogout

I have already set all domain to trusted origin.

please let me know if you have any solution.

Hi @hemantk

The /logout endpoint of the authorization server can not be accessed through ajax request. You can redirect the user through the window browser to this endpoint and Okta will redirect him back to the URL specified under post_logout_redirect_uri.