• JMap.User.logout

    Logout function. Make a call to the server to invalidate the session id.

    If an error occurs, 2 differents string message can be returned :

    • "user.logout.error.server" => Unexpected error while requesting the server
    • "user.logout.error.unexpected" => Unexpected error client side

    Returns Promise<void>

    Example

    // Close the user session client and server side
    JMap.User
    .logout()
    .then(() => {
    console.log(`User has been logout`)
    })