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 (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

I am using below url for logout-

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.

Hi @dragos
I’m trying to hit the oauth2/v1/logout api and passing in the token from a backend handler after being redirected to there from my frontend
i’ve listed my base URL in trusted origins for CORS and redirect as well as in the logout URL under my application settings but I’m still facing this issue
any ideas?

is the logout endpoint CORS enabled?