I am using Spring Security to implement User Logout.
I am able to get 302 Response from : https://valor-sandbox.auth0.com/v2/logout?client_id={my_client_id}&returnTo=http://localhost:4200.
But when the browser is trying to open up returnTo url it is giving CORS error saying that “Origin is set to null”. I understand that this is a CORS issue as our server is a CORS resource and it is trying to redirect to external service. That is why Origin is set to null.
Is there a solution for this?
P.S: I am already setting Access-Control-Allow-Origin: “*”.
Hi @cpandya23,
Welcome to the Auth0 Community Forum!
Have you set your ‘Allowed Logout URLs’?
In addition, if you are referring to the Allowed Origins (CORS) field, wildcards(*) are only allowed on the subdomain level.
Hope this helps!
Thanks,
Dan
Thanks @dan.woda.
I already have set “Allowed Logout URLs” . I have resolved the issue as well.
It was related to Angular.
For future viewers,
I was getting Origin: null because I was using HttpClient to make backend API call.
I have changed it to “window.location.href ={backend-api}” and issue got resolved.
Thanks for posting your solution!