When I click the logout button, I get:
Access to fetch at ‘https://[okta domain]/oauth2/default/v1/revoke’ from origin ‘http://localhost:8080’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.
http://localhost:8080 is in both the login and logout URLs section of the application.
Login and all of the other methods (e.g., getUser()) work fine, it is just the sign out function that seems to be having an issue.
Why does everything else work but sign out throws the CORS error?
Unlike some of the other endpoints used (authorize, token, etc), the revoke endpoint does require that a Trusted Origin be added for the application to be allowed to make the request.
Yeah I was more curious about the reasoning behind that design decision. What is special about revoke that it got the distinction or requiring the CORS setup vs the other endpoints?