Login Authentication (NodeJS Express)
Hi! If you’re reading this, thanks!
I recently began a project that may take a while, and decided to add in a log in system. It’s pretty easy to use Repl.DB, but here’s the problem - after someone logins, and clicks a button, they get redirected. What if someone just types that link straight into the browser? I know there’s a way to stop that from happening, but how?
Thanks!
Voters
Squirrel777
Maybe you can use sessionStorage to prevent that and to redirect to the login page
alanchen12
When someone accesses the URL, you can check if they are logged in or not.
ObiVibKenobi
... how..? @alanchen12
pretty simple, all you gotta do,(i will be using replauth for this example),
this assumes you are using express
If you invite me to the repl i could probably make it more clear.