fixed client_id param in oauth #407

This commit is contained in:
Jan Prochazka
2023-01-05 09:23:31 +01:00
parent e9fffc063b
commit 680c0057b1
2 changed files with 3 additions and 2 deletions

View File

@@ -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);
}