Hi,
I’m new to parse and was trying to create a simple web app with it using static HTML pages, CSS, and JS. I’ve used cloud functions also for a few tasks.
The thing is that I’ve created a login page and a function that checks if the user is logged into the web app with JS client-side and it looks like this:
function CheckUserLogin(){
var currentUser = Parse.User.current();
if (currentUser) {
//do nothing
} else {
//rediect user to login html page
window.location.href = "loginpage.html"
}
}
The thing is that if the user navigates to the /Home.htm
l page via browser URL he can see the page for a few seconds until js checks if he logged in and redirects the user out to the login page.
I guess that’s not so secure…
Any help for achieving this task via JS or are Cloud Functions more secure?