Browse Source

Merge pull request #3 from naresh97/hotfix/authenticationCookieBadType

applied fix to authentication state
pull/4/head
Nareshkumar Rao 3 years ago
committed by GitHub
parent
commit
4f938b1689
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/features/auth/authSlice.js

2
src/features/auth/authSlice.js

@ -2,7 +2,7 @@ import { createSlice } from '@reduxjs/toolkit';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
const initialState = { const initialState = {
isAuthenticated: Cookies.get('authorized'),
isAuthenticated: Cookies.get('authorized') == "true" ? true : false,
}; };
export const authSlice = createSlice({ export const authSlice = createSlice({

Loading…
Cancel
Save