# logoutSession · FT4 TypeScript client · Chromia Docs (concept)

> logoutSession(
    session: Session ,
    disposableKeyStore: FtKeyStore | null,
    loginKeyStore: LoginKeyStore | null,
): () => Promise<void> Creates a 

Source: https://docs.chromia.com/pages/ft4-ts-client/functions/registration.logoutSession/

Function

# logoutSession

* ```signature
  logoutSession(
      session: Session,
      disposableKeyStore: FtKeyStore | null,
      loginKeyStore: LoginKeyStore | null,
  ): () => Promise<void>
  ```

  Creates a function that can be used to log out a session,
  which it does by removing the disposable auth descriptor(s)
  associated with the account stored in the provided session.

  #### Parameters

  + session: [Session](https://docs.chromia.com/pages/ft4-ts-client/interfaces/ft-session.Session/)

    session to use for this action
  + disposableKeyStore: [FtKeyStore](https://docs.chromia.com/pages/ft4-ts-client/interfaces/authentication.FtKeyStore/) | null

    the key store that holds the disposable key for this session
  + loginKeyStore: [LoginKeyStore](https://docs.chromia.com/pages/ft4-ts-client/interfaces/authentication.LoginKeyStore/) | null

    the key store which holds all disposable keys

  #### Returns () => Promise<void>

  #### Remarks

  This function is only suitable if the key to the disposable keystore is
  still available. If not, the admin will have to manually delete auth descriptors
  or wait until they expire.

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-ts-client/functions/registration.logoutSession.html)Generated API reference, mirrored from the live docs
