Sir you didn't use context or other state management, because to implement protected rote it is not safe to use the localstorage, and can we use to do all stuff using context like login logout and all please guid
thank you so muh for this great video. can u plz make a video of how to host it on github since it has a local mysql database so how github will handle it and what we should add to the db definition in noe bcz it is local so how github will handle this?
When I logged in as admin, then if I visit localhost:3000/employeeDetail/1 then , I see employee 1's information. When I logged in as employee, then if I visit localhost:3000/dashboard or localhost:3000/dashboard/create then , I see admin's page. But I want to protect them. Like when I logged in as admin, if I visit localhost:3000/employeeDetail/1 then it must show you don't have access & Like when I logged in as employee, if I visit llocalhost:3000/dashboard or localhost:3000/dashboard/create then it must show you don't have access. How to do that ? please post video on that too. or mention the answer in comments
All of good thank you everything but this is not role based authentication when we can login with employee we can acces the admin panel how can ignore this
u can use protected routes like he did but u can set new one for the admin and set its value to true for admin and false for employee when loged in so he cant access the other parts ...
Thank you for a great tutorial. I have managed to follow this and the admin section is fully functional. The issue I have is the Employee login does not start the login in process but does not throw any errors, it just stalls. I have checked my code against the source code. Any ideas?