Hi @david-blox, at a first look I’m noticing nothing wrong in your code.
The 401 HTTP status code may lead me to think that the value of the client_id
parameter is not correct, maybe due to any wrong assignment. I think of this as a remote possibility, but please, check if the value of the client_id
parameter is correct when you get the 401 HTTP status code.
Also, is there any special reason you are specifying the client_id
parameter in the logout URL?
Have you tried to not provide the client_id
parameter?
Have you configured any Allowed Logout URLs in the Auth0 dashboard?
Please, check out this document to get more info about using the client_id
parameter.
Let me know if any of these attempts resolve your issue.