Skip to content

Commit

Permalink
Merge pull request #2152 from City-of-Helsinki/HL-838-authentication-…
Browse files Browse the repository at this point in the history
…lang

HL-838: Use language for strong identification
  • Loading branch information
sirtawast authored Jul 30, 2023
2 parents d640405 + 4f2e0e7 commit 8a20691
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/benefit/applicant/src/hooks/useLogin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import {
} from 'benefit-shared/backend-api/backend-api';
import { useRouter } from 'next/router';
import React from 'react';
import useLocale from 'shared/hooks/useLocale';

const useLogin = (): (() => Promise<boolean>) => {
const router = useRouter();
const locale = useLocale();
return React.useCallback(
() => router.push(getBackendUrl(BackendEndpoint.LOGIN)),
[router]
() => router.push(`${getBackendUrl(BackendEndpoint.LOGIN)}?lang=${locale}`),
[router, locale]
);
};

Expand Down

0 comments on commit 8a20691

Please sign in to comment.