mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 18:34:01 +00:00
fixed client_id param in oauth #407
This commit is contained in:
@@ -47,6 +47,7 @@ module.exports = {
|
|||||||
permissions,
|
permissions,
|
||||||
login,
|
login,
|
||||||
oauth: process.env.OAUTH_AUTH,
|
oauth: process.env.OAUTH_AUTH,
|
||||||
|
oauthClient: process.env.OAUTH_CLIENT_ID,
|
||||||
oauthLogout: process.env.OAUTH_LOGOUT,
|
oauthLogout: process.env.OAUTH_LOGOUT,
|
||||||
isLoginForm: !!process.env.AD_URL || (!!logins && !process.env.BASIC_AUTH),
|
isLoginForm: !!process.env.AD_URL || (!!logins && !process.env.BASIC_AUTH),
|
||||||
...currentVersion,
|
...currentVersion,
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export async function redirectToLogin(config = null, force = false) {
|
|||||||
sessionStorage.setItem('oauthState', state);
|
sessionStorage.setItem('oauthState', state);
|
||||||
console.log('Redirecting to OAUTH provider');
|
console.log('Redirecting to OAUTH provider');
|
||||||
location.replace(
|
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
|
location.origin + location.pathname
|
||||||
)}&state=${encodeURIComponent(state)}`
|
)}&state=${encodeURIComponent(state)}`
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user