Skip to content

zkLogin ​

zkLogin gives a user a self-custodial Sui address from an OAuth login. There is no seed phrase and no browser extension. Inodra runs the two services that zkLogin needs: the salt service and the prover.

New here? First zkLogin transaction in 6 steps.

How it works ​

  1. Your app makes an ephemeral key pair and puts a nonce in the OAuth request.
  2. The user signs in with Google, Apple, Twitch, or Facebook. Your app gets a JWT.
  3. POST /v1/zklogin/address returns the user's Sui address. Inodra derives the salt.
  4. POST /v1/zklogin/prove returns a zero-knowledge proof for the session.
  5. The ephemeral key signs transactions. The proof makes each signature valid for the address until maxEpoch passes.

Inodra never holds a user key. See Security.

Setup checklist ​

  1. Register an OAuth client with your provider. Note the client ID.
  2. Open zkLogin in the dashboard, select the project, and add the client ID. Client IDs are registered per project. Add one entry for each client ID your app uses.
  3. Under API keys, create a key with the zkLogin scope. See API Key Scopes.
  4. For a key that ships in a browser:
  5. Follow the Quickstart.

A request with a JWT audience that is not on your list gets 403 AUDIENCE_NOT_ALLOWED.

The client ID rule ​

The address depends on the client ID. The client ID is the aud claim of the JWT. A different client ID gives a different address for the same user.

  • Google and Apple issue a different client ID for each platform: web, iOS, Android.
  • Use one shared client ID on all platforms. If you do not, the same user gets a different address on each platform.
  • If you change or rotate the client ID later, every address changes.
  • If you remove a client ID from a project, logins with it through that project stop. Addresses never change.
  • The address does not depend on the project. The same user and client ID give the same address in every project.

The address also depends on your Inodra organization. See How salts work.

Supported providers ​

ProviderIssuer (iss)
Googlehttps://accounts.google.com
Applehttps://appleid.apple.com
Twitchhttps://id.twitch.tv/oauth2
Facebookhttps://www.facebook.com

A JWT from another issuer gets 400 UNSUPPORTED_ISSUER.

Networks ​

Mainnet and testnet. The Free plan is testnet only. Devnet returns 400 NETWORK_NOT_SUPPORTED.

Base URLs: https://mainnet-api.inodra.com and https://testnet-api.inodra.com. The key's network selects the network.

  • An API key belongs to a project, and a project has one network. A new organization's default project is on mainnet.
  • Prove checks maxEpoch against the epoch of the key's network. Read the epoch from that same network.
  • The address does not depend on the network. A user has the same address on mainnet and testnet.

Pricing ​

MethodPathCreditsPurpose
POST/v1/zklogin/nonce1Nonce, randomness, and maxEpoch
POST/v1/zklogin/address2Salt and address for a JWT
POST/v1/zklogin/prove0 inside the allowance, else 50Zero-knowledge proof, in about 3 seconds
  • Get one proof for each session. Use it for every transaction until maxEpoch passes.
  • A failed request costs at most 2 credits, never 50. Responses with status 5xx and 429 are not charged. See Billing.

Plans and limits ​

PlanNetworksMonthly active users (mainnet)Proofs per minute
FreeTestnet only0 (1,000 on testnet)5
TeamMainnet, testnet5,00010
GrowthMainnet, testnet15,00020
ProfessionalMainnet, testnet20,00030
BusinessMainnet, testnet30,00060
EnterpriseMainnet, testnetCustomUnlimited
  • Free plan. zkLogin works on testnet only. A mainnet key gets 403 PLAN_REQUIRED. Prepaid wallet organizations have the same limits.
  • Active user. A user is one zkLogin address. It counts once per billing period, per network, when it first gets a salt (/address) or a proof (/prove) in that period. Testnet users never count toward the mainnet allowance.
  • No overage. At the allowance, /address and /prove return 403 PLAN_REQUIRED for a new user until the next period. Users who are already active keep working. Upgrade the plan to add users.
  • Proof allowance. Each active user adds 20 proofs per billing period to a pool for the organization. For example, 1,000 active users give 20,000 proofs that period. Proofs inside the pool cost 0 credits. Above the pool, a proof costs 50 credits.
  • Repeated proofs. A second prove for the same session (same JWT identity and nonce, for example a retry or a second tab) returns the cached proof. It costs 2 credits and does not use the pool.
  • Per-user limit. Each address can get 2 proofs per minute. A real user needs one proof per session, so this limit only stops loops and scripts. Cached repeats do not count.
  • Over a proofs-per-minute cap, prove returns 429 PROOF_RATE_LIMITED with a Retry-After header.

The Users tab on the dashboard zkLogin page shows active users this period, the included users, total users, and proofs this period. It also lists the addresses, with search and CSV export. The organization owner gets an email at 80% and at 100% of the allowance.

Gasless transactions ​

zkLogin signatures work with the Fuel Station. A new user can transact with no SUI. See step 6 of the Quickstart.

Next steps ​

The full-stack Sui data layer.