Skip to content

Commit

Permalink
Merge pull request #91 from suvarnakale/shiksha-2.0
Browse files Browse the repository at this point in the history
Issue #319 feat: keycloak link added for forgot password
  • Loading branch information
itsvick authored May 9, 2024
2 parents a09c904 + 34dd491 commit e853e13
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const Header: React.FC = () => {
}
};
const handleLogoutClick = () => {
router.replace('/logout');
router.replace('/Logout');
};
const [openDrawer, setOpenDrawer] = useState<boolean>(false);

Expand Down
13 changes: 9 additions & 4 deletions src/pages/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { useState } from 'react';
import { useTheme } from '@mui/material/styles';
import { useTranslation } from 'react-i18next';

import { getUserId } from '../services/ProfileService';
interface State extends SnackbarOrigin {
openModal: boolean;
}
Expand Down Expand Up @@ -98,7 +99,6 @@ const LoginPage = () => {
username: username,
password: password,
});
console.log(response);
if (response) {
setTimeout(() => {
setState({
Expand All @@ -115,8 +115,8 @@ const LoginPage = () => {
? localStorage.setItem('refreshToken', refreshToken)
: localStorage.removeItem('refreshToken');

// const userResponse = await getUserId();
// localStorage.setItem('userId', userResponse?.userId);
const userResponse = await getUserId();
localStorage.setItem('userId', userResponse?.userId);
}
setLoading(false);
router.push('/Dashboard');
Expand All @@ -138,6 +138,7 @@ const LoginPage = () => {
const handleChange = (event: SelectChangeEvent) => {
setLanguage(event.target.value);
i18n.changeLanguage(event.target.value);
localStorage.setItem('preferredLanguage', event.target.value);
};

const handleClick = (newState: SnackbarOrigin) => () => {
Expand Down Expand Up @@ -272,7 +273,11 @@ const LoginPage = () => {
</Box>

<Box marginTop={'-1rem'} marginLeft={'0.5rem'}>
<Link sx={{ color: 'blue' }} href="#" underline="none">
<Link
sx={{ color: 'blue' }}
href="https://qa.prathamteacherapp.tekdinext.com/auth/realms/pratham/login-actions/reset-credentials?client_id=security-admin-console&tab_id=R-3zEZbbbyM"
underline="none"
>
{t('LOGIN_PAGE.FORGOT_PASSWORD')}
</Link>
</Box>
Expand Down

0 comments on commit e853e13

Please sign in to comment.