-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perform login on request #103
Comments
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 |
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.
The text was updated successfully, but these errors were encountered: