INNER CODE UNIT · TypeScript

logout

dfinity/examples · motoko/vetkeys/basic_bls_signing/frontend/src/main.ts:48

export function logout() {
  void authClient?.signOut();
  myPrincipal = undefined;
  myVerificationKey = undefined;
  basicBlsSigningActor = undefined;
  updateUI(false);
  document.getElementById("signaturesList")!.classList.toggle("hidden", true);
}

async function initAuth() {
  const isLocalEnv =
    window.location.hostname === "localhost" ||
    window.location.hostname.endsWith(".localhost");
  // The client mints its delegations by calling the II canister, so its agent
  // needs the network's root key to verify the responses.
  authClient = new AuthClient({
    identityProvider: {
      authorizeUrl: isLocalEnv

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…