From d3c0095c2c309771046b44e4113b0fd49e000dcc Mon Sep 17 00:00:00 2001 From: mattieserver <3049868+mattieserver@users.noreply.github.com> Date: Tue, 7 Mar 2023 21:56:23 +0100 Subject: [PATCH] added loginEndPointWithPath (#1358) * added loginEndPointWithPath Signed-off-by: Mattijs Vanhaverbeke (cherry picked from commit 87e64cfdfcfc2b07b713e0647d9e1f9015f11bc1) --- public/apps/login/login-page.tsx | 3 ++- public/apps/login/test/__snapshots__/login-page.test.tsx.snap | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/public/apps/login/login-page.tsx b/public/apps/login/login-page.tsx index 3179ad1be..2c7ceeec1 100644 --- a/public/apps/login/login-page.tsx +++ b/public/apps/login/login-page.tsx @@ -115,6 +115,7 @@ export function LoginPage(props: LoginPageDeps) { buttonConfig: LoginButtonConfig ) => { const buttonId = `${authType}_login_button`; + const loginEndPointWithPath = `${props.http.basePath.serverBasePath}${loginEndPoint}`; return ( {buttonConfig.buttonname} diff --git a/public/apps/login/test/__snapshots__/login-page.test.tsx.snap b/public/apps/login/test/__snapshots__/login-page.test.tsx.snap index 4381088ee..a73477edc 100644 --- a/public/apps/login/test/__snapshots__/login-page.test.tsx.snap +++ b/public/apps/login/test/__snapshots__/login-page.test.tsx.snap @@ -121,7 +121,7 @@ exports[`Login page renders renders with config value for multiauth 1`] = ` aria-label="openid_login_button" className="test-btn-style" data-test-subj="submit" - href="/auth/openid/login" + href="/app/opensearch-dashboards/auth/openid/login" iconType="http://localhost:5601/images/test.png" size="s" type="prime" @@ -141,7 +141,7 @@ exports[`Login page renders renders with config value for multiauth 1`] = ` aria-label="saml_login_button" className="test-btn-style" data-test-subj="submit" - href="/auth/saml/captureUrlFragment?nextUrl=%2F" + href="/app/opensearch-dashboards/auth/saml/captureUrlFragment?nextUrl=%2F" iconType="http://localhost:5601/images/test.png" size="s" type="prime"