ITZABUILD PORTAL · v0.8 Start building ↗
GUIDELINE 01

Make login user-friendly and consistent

Use the network login helpers as the single identity path, and keep credentials and private keys out of browser storage.

← All guidelines

Recommended flow

  1. Load the CDN and finish itza.init() before enabling the form.
  2. Use network_signup for a new account and network_login for an existing one.
  3. Show the progress callback; registration may derive wallets and complete proof-of-work.
  4. Keep the returned keypair in memory only. Show the public address when identity matters.
  5. Replace technical exceptions with a useful action: retry, sign up, or check the selected network.

Important details

  • Usernames may be entered with or without @.
  • The same credentials deterministically recover the cluster wallet. A login on another cluster may register its derived cluster wallet.
  • Do not use the deprecated test_login or test_create_login aliases in new apps.
  • Never log passwords, mnemonics, or complete keypairs.
Login and registration
const CLUSTER_ID = 1;
await itza.init(CLUSTER_ID, "dev");

const progress = (message, percent) => {
  status.textContent = `${message} · ${percent}%`;
};

async function authenticate(mode, username, password) {
  if (!username.trim() || !password) throw new Error("Enter username and password");
  const action = mode === "signup" ? itza.network_signup : itza.network_login;
  const wallet = await action(username, password, CLUSTER_ID, progress);
  console.info("Signed in as", wallet.address); // public address only
  return wallet; // keep wallet.keypair in memory
}
Bottom line

One form, one selected network and cluster, visible progress, and no persisted credentials produces the least surprising login experience.