Redux state management shows undefined on passing bearer token to the api

I am currently working on a Next.js Typescript application with redux. I have implemented the authentication with Auth0. But I am facing this problem with state management. As soon as the bearer token is passed in the header for authorization, the state stops updating and shows undefined.