When I try to log out the current user of my app I get this message : TypeError: CB.CloudUser.current.logOut is not a function
Here is my code :
$scope.logout = function() {
CB.CloudUser.current.logOut({
success: function(user) {
//log out successfull
var currentUser = user;
$timeout(function() {
$scope.userConnected = false;
document.getElementById("body-container").className = "hold-transition login-page";
});
},
error: function(err) {
//Error occured in user registration.
}
});
Thank you for your help.
Here is what I have in CB.CloudUser.current: