Commit a54df0c3 by Pranit Bauva Committed by GitHub

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

Closes #27226
parent bba47705
...@@ -4,6 +4,8 @@ import { getBackendSrv } from '@grafana/runtime'; ...@@ -4,6 +4,8 @@ import { getBackendSrv } from '@grafana/runtime';
import { css } from 'emotion'; import { css } from 'emotion';
import { GrafanaTheme } from '@grafana/data'; import { GrafanaTheme } from '@grafana/data';
import config from 'app/core/config';
interface EmailDTO { interface EmailDTO {
userOrEmail: string; userOrEmail: string;
} }
...@@ -53,7 +55,7 @@ export const ForgottenPassword: FC = () => { ...@@ -53,7 +55,7 @@ export const ForgottenPassword: FC = () => {
</Field> </Field>
<HorizontalGroup> <HorizontalGroup>
<Button>Send reset email</Button> <Button>Send reset email</Button>
<LinkButton variant="link" href="/login"> <LinkButton variant="link" href={`${config.appSubUrl}/login`}>
Back to login Back to login
</LinkButton> </LinkButton>
</HorizontalGroup> </HorizontalGroup>
......
...@@ -12,6 +12,8 @@ import { Branding } from 'app/core/components/Branding/Branding'; ...@@ -12,6 +12,8 @@ import { Branding } from 'app/core/components/Branding/Branding';
import { HorizontalGroup, LinkButton } from '@grafana/ui'; import { HorizontalGroup, LinkButton } from '@grafana/ui';
import { LoginLayout, InnerBox } from './LoginLayout'; import { LoginLayout, InnerBox } from './LoginLayout';
import config from 'app/core/config';
const forgottenPasswordStyles = css` const forgottenPasswordStyles = css`
padding: 0; padding: 0;
margin-top: 4px; margin-top: 4px;
...@@ -51,7 +53,7 @@ export const LoginPage: FC = () => { ...@@ -51,7 +53,7 @@ export const LoginPage: FC = () => {
<LinkButton <LinkButton
className={forgottenPasswordStyles} className={forgottenPasswordStyles}
variant="link" variant="link"
href="/user/password/send-reset-email" href={`${config.appSubUrl}/user/password/send-reset-email`}
> >
Forgot your password? Forgot your password?
</LinkButton> </LinkButton>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment