# Logout user

> Web3Auth Unity SDK - logout | Embedded Wallets

Trigger logout flow. This function doesn't take parameters. A completable future containing a void object will be returned on successfull logout otherwise an error response is returned.

:::tip

Additionally you can associate a function to be triggered on successful logout.

```cs
void Start()
{
    web3Auth = GetComponent<Web3Auth>();
    web3Auth.setOptions(new Web3AuthOptions()
    {

    });
    // focus-next-line
    web3Auth.onLogout += onLogout;
}
//focus-start
private void onLogout()
{
    // Functions to be called after user logs out
}
//focus-end
```

:::

## Usage

```cs
public void logout()
{
    web3Auth.logout();
    Debug.Log("Logged out!");
}
```
