Hello Shopify Community!
I’m implementing an authentication system on the headless side by controlling cookie data. I log in on the Shopify account page, and it redirects to our headless site, and it saves cookie data.
I made the logout link in the headless side, and its link is https://xxx.myshopify.com/account/logout. When I click this link, I removed cookie data, and redirects to this link, then it is logged out of Shopify store.
But after logout, it automatically redirects to https://xxx.myshopify.com. I just want to redirect to the custom domain, like https://example.vercel.app. So it is an external link.
Are there any solution for this? Like the redirect after login. We can redirect to custom page after Shopify login using the following link. https://xxx.myshopify.com/account/login?return_url=%2Faccount. I want this kind of solution for logout or any other solutions.
Thank you in advance.