Wordpress plug in redirect on Log Out to external url not working


I m trying to redirect the user to another domain on log out and I cant get it to work.
I added this function to function.php function auth0_hook_logout_url ($redirect_to) {
return $redirect_to . ‘&federated’;
add_filter(‘auth0_logout_url’, ‘auth0_hook_logout_url’);


It does not work and it redirects me back to the Wordpress log in which in turns opens up my custom domain on auth0 and the classic universal log in.

I have added the external domain in Tenant / advance settings allowed log out urls.

Many thanks in advance.

Does anyone know of a solution? If I disable the auth0 plugin in my log out redirect works perfectly.
function bb_redirect_after_logout(){
wp_redirect( ‘https://google.com’ );