Answer the question
In order to leave comments, you need to log in
How can you deny access to resources without authentication?
There is a project on Node.js + Angular, passport.js is used for authentication.
When starting a project, a page with authorization and registration is available to the user.
After successfully entering the site, redirection to the main content of the site occurs in the following way: res.sendfile('./public/main.html');
In the address bar, the following is displayed: 127.0.0.1:2300/#!
Question: how to prevent direct access to main.html (and other pages) from the address bar if the user has not been authenticated?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question