So there's a login page and let's say a dashboard with certain data fields. When I press logout from the dashboard it redirects me to the login page. But when I hit back button, it brings me back tot he dashboard and technically let's me access data I shouldn't be able to access.
It was solved by refreshing after pressing back button, because it seems that is the page cache loading from memory which needs to be refreshed. But I don't want the user to have to manually refresh.
Any workaround to that, or a completely different solution would be great.
In angular, you can use #hostListner(angular decorator). that is used for handling dom events in angular.
in your project, you can help localStorage and #hostListner
store client information on local storage with javascript.
store local storage
and then in the log-in page
add #hostListner event in component.ts file
event handling
Implement session validation in each of your route $routeChangeStart event. Whenever user loggout clear the session data and redirect it default route which should be your login page.
I'm Using Next.js in my project. I am having payment option in my application., Once I got redirected from the Payment gateway I want to stop user clicking browser back button.
currently, If user click browser back buton it goes back to payment gateway.
I am using next-routesfor routing, redux for state management.,
I tried to stop browser back navigation with this package disable-browser-back-navigation, but the issue remains same.
can anyone help me on this.
I have a problem when i creating a web for myself. when i login and go to dashboard. and when some code edited will refresh the page but back to login page again / always logout. this is after i refresh the page in dashboard. my question, how to prevent back to login or prevent logout after refresh the page. this is for react js. thank you, from the newbie
I am a beginner to react and creating a login page in which i want to redirect to another page on clicking of login button.how can we achieve this?
I am trying to automate a Gmail login Page where I face one issue.
Replication steps:
Update User Name and Password
Click on Sign Button.
There will be "Loading Page" before the main Inbox Page. I need to validate that this Loading page appeared after the sign-in click and before Inbox Page in Gmail.
Please suggest a solution for this.