mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 19:26:00 +00:00
fixed client_id param in oauth #407
This commit is contained in:
@@ -74,7 +74,7 @@ export async function redirectToLogin(config = null, force = false) {
|
||||
sessionStorage.setItem('oauthState', state);
|
||||
console.log('Redirecting to OAUTH provider');
|
||||
location.replace(
|
||||
`${config.oauth}?client_id=dbgate&response_type=code&redirect_uri=${encodeURIComponent(
|
||||
`${config.oauth}?client_id=${config.oauthClient}&response_type=code&redirect_uri=${encodeURIComponent(
|
||||
location.origin + location.pathname
|
||||
)}&state=${encodeURIComponent(state)}`
|
||||
);
|
||||
@@ -83,7 +83,7 @@ export async function redirectToLogin(config = null, force = false) {
|
||||
}
|
||||
|
||||
export function internalRedirectTo(path) {
|
||||
const index = location.pathname.lastIndexOf('/');
|
||||
const index = location.pathname.lastIndexOf('/');
|
||||
const newPath = index >= 0 ? location.pathname.substring(0, index) + path : path;
|
||||
location.replace(newPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user