Skip to main content

Sign-Out

The signOut method is used to log out the authenticated user from zkDatabase.

Definition

await zkdb.auth.signOut(): Promise<void>;

Parameters

  • None

Returns

  • A promise that resolves when the user is successfully logged out.

Example

import { ZkDatabase } from 'zkdb';

const zkdb = await ZkDatabase.connect({
userName: "chiro-user",
privateKey: "EKFTciRxyxshZjimay9sktsn7v5PvmC5zPq7q4JnitHUytxUVnFP",
environment: "node",
// This URL is for test environment
url: "https://api.zkdatabase.org/graphql",
});

await zkdb.auth.signOut();

This example demonstrates how to sign out the currently authenticated user from zkDatabase.