> For the complete documentation index, see [llms.txt](https://docs.conscent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.conscent.ai/version-1.0/logout.md).

# Logout

{% tabs %}
{% tab title="shell" %}

```sh
const callLogoutBtn = () => {
    const csc = window._csc as any;
    csc('logout', {
      debug: true,
      clientId: clientId,
      wrappingElementId: 'embed',
      logoutCallback: async () => {
        console.log('logout');
      },
      unauthorizedCallback: () => {
        console.log('unauthorized callback called');
      },
    });
  };
```

{% endtab %}

{% tab title="javaScript" %}

```javascript
const callLogoutBtn = () => {
    const csc = window._csc as any;
    csc('logout', {
      debug: true,
      clientId: clientId,
      wrappingElementId: 'logout',
      logoutCallback: async () => {
        console.log('logout');
      },
      unauthorizedCallback: () => {
        console.log('unauthorized callback called');
      },
    });
  };
```

{% endtab %}

{% tab title="php" %}

```php
const callLogoutBtn = () => {
    const csc = window._csc as any;
    csc('logout', {
      debug: true,
      clientId: clientId,
      wrappingElementId: 'logout',
      logoutCallback: async () => {
        console.log('logout');
      },
      unauthorizedCallback: () => {
        console.log('unauthorized callback called');
      },
    });
  };
```

{% endtab %}
{% endtabs %}
