Log out of a user account

Logout a User

Logout serves as the most basic and important feature.

This is how you can use this method in your application:


This method comes handy because logging out helps prevent other users from accessing the system without verifying their credentials. It also helps protect the current user's access or prevent unauthorised actions on the current login session and is thus an important part of security.

// Send the request to server to logout
// the authenticated user
auth.logout().then((res) => {
    // Handle response