mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
feat(client): allows to redirect to specific url after signout (#5583)
This commit is contained in:
parent
d68c671a12
commit
9fd136b331
@ -139,8 +139,12 @@ export const SettingsMenu: React.FC<{
|
|||||||
key: 'signout',
|
key: 'signout',
|
||||||
label: t('Sign out'),
|
label: t('Sign out'),
|
||||||
onClick: async () => {
|
onClick: async () => {
|
||||||
await api.auth.signOut();
|
const { data } = await api.auth.signOut();
|
||||||
navigate(`/signin?redirect=${encodeURIComponent(redirectUrl)}`);
|
if (data?.data?.redirect) {
|
||||||
|
window.location.href = data.data.redirect;
|
||||||
|
} else {
|
||||||
|
navigate(`/signin?redirect=${encodeURIComponent(redirectUrl)}`);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user