diff --git a/packages/core/client/src/user/CurrentUser.tsx b/packages/core/client/src/user/CurrentUser.tsx index ee369aa697..58dfae0ff9 100644 --- a/packages/core/client/src/user/CurrentUser.tsx +++ b/packages/core/client/src/user/CurrentUser.tsx @@ -139,8 +139,12 @@ export const SettingsMenu: React.FC<{ key: 'signout', label: t('Sign out'), onClick: async () => { - await api.auth.signOut(); - navigate(`/signin?redirect=${encodeURIComponent(redirectUrl)}`); + const { data } = await api.auth.signOut(); + if (data?.data?.redirect) { + window.location.href = data.data.redirect; + } else { + navigate(`/signin?redirect=${encodeURIComponent(redirectUrl)}`); + } }, }, ];