Shopify B2B logout redirection

I’m new to the platform and set up integration between our Shopify store and the Auth0 platform for authentication. However, I’m having issues when logging out of a B2B account from Shopify. The B2B logout code is handled by Shopify and hardcoded without a “ReturnTo” command, meaning the page hangs in Auth0 after logging out.

I want to be able to redirect customers to a homepage after logging out, but I can’t find a way to do this from within Auth0.

Can anyone help or suggest anything to try?

Hi @oliverhartley,

Welcome to the Auth0 Community!

The behavior you’re seeing is expected when the /v2/logout endpoint is called without a returnTo parameter. To resolve this issue, you must configure a default logout URL in your Tenant Settings. You do this at the Tenant level, not the Application level.

  1. Navigate to your Auth0 Dashboard.
  2. On the left-hand menu, go to Settings (this is the general Tenant Settings, not a specific application).
  3. In the “Tenant Settings” page, find the Allowed Logout URLs field.
  4. Enter your Shopify store’s homepage (e.g., https://your-store-homepage.com) into this field.
  5. Scroll down and click Save.

When a logout request hits Auth0 without a returnTo parameter, Auth0 will now check this tenant-level list. It will automatically redirect the user to the first URL it finds in this list, as stated in the documentation

You can read more about B2B Logout here:

And about redirecting the users over here:

If you have any further questions, please don’t hesitate to reach out.

Have a good one,

Vlad

Thanks for the feedback. Not sure if I’m missing something here, but I’d actually already tried this. I added the website’s homepage to the Allowed Logout URL at the tenant level, but I’m still having trouble with this. Just hangs on the logout completed screen

Hi @oliverhartley,

Does the logout request contain the client_id parameter?

Have a good one,
Vlad