Skip to content

Commit

Permalink
Issue #PS-000 fix: Fixed jwtDecode
Browse files Browse the repository at this point in the history
  • Loading branch information
itsvick committed Sep 13, 2024
1 parent 4baaef5 commit d1aeb8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/reset-password/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { showToastMessage } from '@/components/Toastify';
import { useRouter } from 'next/router';
import { forgotPasswordAPI } from '@/services/LoginService';
import CentralizedModal from '@/components/CentralizedModal';
import jwt_decode from 'jwt-decode';
import { jwtDecode } from 'jwt-decode';

const ResetPassword = () => {
const { t } = useTranslation();
Expand All @@ -21,7 +21,7 @@ const ResetPassword = () => {
useEffect(() => {
if (token) {
try {
const decodedToken: any = jwt_decode(token as string);
const decodedToken: any = jwtDecode(token as string);
const currentTime = Date.now() / 1000;
if (decodedToken.exp < currentTime) {
setIsTokenValid(false);
Expand Down

0 comments on commit d1aeb8a

Please sign in to comment.