logout

logout(postLogoutLocation)

Clears the active session and its identity, best-effort revokes any proxy keys the server issued for it, and clears the Wallet API’s cached identity too.

Arguments:
  • postLogoutLocation – Browser only, ignored elsewhere. A string or URL to navigate to once logout completes.

Return type:

Promise<void>

Example

const identity = require('dcp/identity');

await identity.logout();