Server Logout

How can I logout on the server side and redirect to login, I am fetching data from server with ssr and based on auth error I want to trigger logout. Can I do that?
Was this page helpful?