This question is locked. New answers and comments are not allowed.
I have created an app using the Views functionality, including the authentication view.
Prior to being logged in I can access some of my custom views and functionality without having to log in.
I have tried to achieve this using this code:
provider.Users.currentUser().then(
function
(res) {
console.log(
"Logged in "
+ JSON.stringify(res));
if
(res.result ==
null
|| res.result == undefined) {
app.notify.error(
"Please log in to continue"
);
return
app.mobileApp.navigate(
'components/authenticationView/view.html'
);
}
});
But for some reason I can still access the view one time without logging in.
How can I properly secure all views so that the user is redirected to the login view?