diff --git a/web/src/auth/AuthCallback.js b/web/src/auth/AuthCallback.js index 9fcb72752..06e4e9811 100644 --- a/web/src/auth/AuthCallback.js +++ b/web/src/auth/AuthCallback.js @@ -106,7 +106,7 @@ class AuthCallback extends React.Component { method: method, }; const oAuthParams = Util.getOAuthGetParameters(innerParams); - const concatChar = oAuthParams.redirectUri.indexOf('?') === -1 ? '?' : '&'; + const concatChar = oAuthParams?.redirectUri?.indexOf('?') === -1 ? '?' : '&'; AuthBackend.login(body, oAuthParams) .then((res) => { if (res.status === 'ok') { diff --git a/web/src/auth/LoginPage.js b/web/src/auth/LoginPage.js index 0333b8327..cf9a9eabc 100644 --- a/web/src/auth/LoginPage.js +++ b/web/src/auth/LoginPage.js @@ -138,7 +138,7 @@ class LoginPage extends React.Component { Setting.goToLink(link); } else if (responseType === "code") { const code = res.data; - const concatChar = oAuthParams.redirectUri.indexOf('?') === -1 ? '?' : '&'; + const concatChar = oAuthParams?.redirectUri?.indexOf('?') === -1 ? '?' : '&'; if (Setting.hasPromptPage(application)) { AuthBackend.getAccount("")