SYNC: dbgate cloud redirect workflow

This commit is contained in:
SPRINX0\prochazka
2025-06-24 09:22:16 +02:00
committed by Diflow
parent bd88b8411e
commit eba16cc15d
9 changed files with 64 additions and 13 deletions

View File

@@ -135,8 +135,16 @@
}
async function handleOpenCloudLogin() {
const { url, sid } = await apiCall('auth/create-cloud-login-session', { client: getElectron() ? 'app' : 'web' });
openWebLink(url, true);
const useRedirect = getCurrentConfig()?.redirectToDbGateCloudLogin;
const { url, sid } = await apiCall('auth/create-cloud-login-session', {
client: getElectron() ? 'app' : 'web',
redirectUri: useRedirect ? location.origin + location.pathname : undefined,
});
if (useRedirect) {
location.href = url;
} else {
openWebLink(url, true);
}
}
</script>