mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 18:03:58 +00:00
fixed redirect_uri parameter #891
This commit is contained in:
@@ -45,6 +45,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function extractRedirectUri() {
|
||||||
|
const res = (location.origin + location.pathname).replace(/\/login.html$/, '/');
|
||||||
|
console.log('Using redirect URI:', res);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
async function processSingleProvider(provider) {
|
async function processSingleProvider(provider) {
|
||||||
if (provider.workflowType == 'redirect') {
|
if (provider.workflowType == 'redirect') {
|
||||||
await processRedirectLogin(provider.amoid);
|
await processRedirectLogin(provider.amoid);
|
||||||
@@ -86,7 +92,7 @@
|
|||||||
const resp = await apiCall('auth/redirect', {
|
const resp = await apiCall('auth/redirect', {
|
||||||
amoid: amoid,
|
amoid: amoid,
|
||||||
state,
|
state,
|
||||||
redirectUri: location.origin + location.pathname,
|
redirectUri: extractRedirectUri(),
|
||||||
});
|
});
|
||||||
|
|
||||||
const { uri } = resp;
|
const { uri } = resp;
|
||||||
@@ -194,9 +200,7 @@
|
|||||||
// }`
|
// }`
|
||||||
// );
|
// );
|
||||||
internalRedirectTo(
|
internalRedirectTo(
|
||||||
`/connections/dblogin-web?conid=${selectedConnection?.conid}&state=${encodeURIComponent(state)}&redirectUri=${
|
`/connections/dblogin-web?conid=${selectedConnection?.conid}&state=${encodeURIComponent(state)}&redirectUri=${extractRedirectUri()}`
|
||||||
location.origin + location.pathname
|
|
||||||
}`
|
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user