Skip to content

Commit

Permalink
added loginEndPointWithPath (opensearch-project#1358) (opensearch-pro…
Browse files Browse the repository at this point in the history
…ject#1374)

* added loginEndPointWithPath
Signed-off-by: Mattijs Vanhaverbeke <mattijs-v@live.be>
(cherry picked from commit 87e64cfdfcfc2b07b713e0647d9e1f9015f11bc1)
  • Loading branch information
opensearch-trigger-bot[bot] committed Mar 21, 2023
1 parent 51483d4 commit d1d9ff8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion public/apps/login/login-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export function LoginPage(props: LoginPageDeps) {
buttonConfig: LoginButtonConfig
) => {
const buttonId = `${authType}_login_button`;
const loginEndPointWithPath = `${props.http.basePath.serverBasePath}${loginEndPoint}`;
return (
<EuiFormRow>
<EuiButton
Expand All @@ -123,7 +124,7 @@ export function LoginPage(props: LoginPageDeps) {
size="s"
type="prime"
className={buttonConfig.buttonstyle || 'btn-login'}
href={loginEndPoint}
href={loginEndPointWithPath}
iconType={buttonConfig.showbrandimage ? buttonConfig.brandimage : ''}
>
{buttonConfig.buttonname}
Expand Down
4 changes: 2 additions & 2 deletions public/apps/login/test/__snapshots__/login-page.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit d1d9ff8

Please sign in to comment.