perform login on request
how can i implement login at some specific point, the current implementation forces the user to login as soon as you launch the app or open the home page, what if the home page isn't protected page is login a mandate there. How to avoid this.
If you are using react router, you can define which pages are public and which pages will be protected. Take a look https://reacttraining.com/react-router/web/example/auth-workflow
I have already done that as per the readme you have provided an hoc for the same. But the problem is in index.ts we create the authentication context so as soon as app loads it redirects to the login page which I do not want, it should preferably redirect only on protected pages rather than just making the user login on first load.
In the index.ts example you have a constant variable which is a Boolean if I try changing that value it never asks for login even protected pages are accessible without login than.
@mdmoin7 were you able to make this work ? If so can you please share it. I'm facing the same problem.
cc: @salvoravida