Login: Honour `root_url` for Forget Password related links (#27368)

Closes #27226
pull/27249/head^2
Pranit Bauva 5 years ago committed by GitHub
parent bba4770509
commit a54df0c3cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      public/app/core/components/ForgottenPassword/ForgottenPassword.tsx
  2. 4
      public/app/core/components/Login/LoginPage.tsx

@ -4,6 +4,8 @@ import { getBackendSrv } from '@grafana/runtime';
import { css } from 'emotion';
import { GrafanaTheme } from '@grafana/data';
import config from 'app/core/config';
interface EmailDTO {
userOrEmail: string;
}
@ -53,7 +55,7 @@ export const ForgottenPassword: FC = () => {
</Field>
<HorizontalGroup>
<Button>Send reset email</Button>
<LinkButton variant="link" href="/login">
<LinkButton variant="link" href={`${config.appSubUrl}/login`}>
Back to login
</LinkButton>
</HorizontalGroup>

@ -12,6 +12,8 @@ import { Branding } from 'app/core/components/Branding/Branding';
import { HorizontalGroup, LinkButton } from '@grafana/ui';
import { LoginLayout, InnerBox } from './LoginLayout';
import config from 'app/core/config';
const forgottenPasswordStyles = css`
padding: 0;
margin-top: 4px;
@ -51,7 +53,7 @@ export const LoginPage: FC = () => {
<LinkButton
className={forgottenPasswordStyles}
variant="link"
href="/user/password/send-reset-email"
href={`${config.appSubUrl}/user/password/send-reset-email`}
>
Forgot your password?
</LinkButton>

Loading…
Cancel
Save