logout
This method comes handy because along with logging the user in, it is also required to logout a user when required.
This method returns the following codes upon execution
AUTH-ACCOUNT-LOGGEDOUT
user has been logged out of his account
AUTH-UNAUTHORIZED
user is not authenticated
AUTH-ACCOUNT-LOGOUT-FAILED
logout operation failed
This is how you can use this method in your application
// Send the request to server to logout
// the authenticated user
auth.logout().then((res) => {
// Handle response
});