When using zkLogin to create an account for a specific application, the wallet address generated for you is unique to that app and OAuth provider (e.g. Google). This is because zkLogin derives the address based on several factors, including the JWT, the client ID (aud) of the application, and your user salt.
Here’s why this matters:
App-specific address
The zkLogin address is derived from the application’s client ID, so if you log into multiple applications using the same OAuth provider (e.g. Google), zkLogin will generate different addresses for each app. This is because the client ID is distinct for each app, and thus each zkLogin session produces a unique Sui address.
No reuse of existing Sui accounts
Unlike traditional Sui wallets, zkLogin addresses are not tied to a single public - private keypair. Instead, they are derived based on the combination of the JWT and other app-specific parameters.
This means you cannot use the same zkLogin address across multiple apps, and there’s no way to select an existing account from your Sui wallet for login purposes.
Privacy and Security
One of the key features of zkLogin is that it provides privacy by unlinking OAuth identities from blockchain accounts. Since the zkLogin address is tied to specific OAuth flows, it helps maintain privacy by ensuring no two apps can link your activity across them.
In summary, zkLogin is designed to generate unique addresses for each app to protect user privacy and ensure a strong separation of identities between applications.
If you’re looking for seamless account reuse across dApps, you can look into dapp-kit and Stashed: Stashed Integration | Sui TypeScript Docs