mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 21:55:59 +00:00
SYNC: dbgate cloud redirect workflow
This commit is contained in:
committed by
Diflow
parent
bd88b8411e
commit
eba16cc15d
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user