I want to check if my user is registered, I am currently using
if(currentUser == null) { window.location.replace("login.html"); }
redirect the user to the login page. But I saw tutorials in which the user exchanged if(currentUser) {...} instead of the entire contents of the code.
I was also interested in Parse authenticated() , but the documentation does not indicate how to use it, except that it returns a boolean value.
I just wanted to know if one of these three is faster / more efficient than the other, and if the parsing is done, I would like to know how it works.
And I want to redirect the user to the login.html page if he is not logged in.
Thanks!
source share