Skip to content
Blog

Wallet Login

Wallet login lets users authenticate with their Solana wallet instead of an email and password. The mechanism is a Sign-in-with-Solana challenge-response: the server issues a nonce, the wallet signs it, and the server verifies the signature cryptographically. No personal information changes hands at any point.

Currently supported wallets: Phantom, Backpack, Solflare.

  1. Go to the Tribe dashboard
  2. Open your site’s Settings → Auth → Privacy-Preserving Auth
  3. Toggle on Wallet Login

Not every user will have a Solana wallet installed, so check before showing a wallet login button:

import { Tribe } from "@tribecloud/sdk";
const available = tribe.isWalletAvailable();
// Returns true if Phantom, Backpack, or Solflare is detected
const { user } = await tribe.loginWithWallet();
// user.walletAddress — the wallet's public key
// user.pseudonymousId — stable hashed identifier
// user.authMethod — "wallet"

Behind this single call, the SDK orchestrates the full sequence:

  1. Requests a nonce from the Tribe server
  2. Prompts the user to sign a message in their wallet popup
  3. Sends the signature back to the server for cryptographic verification
  4. Stores the resulting session token

If you want to display a distinct button for each installed wallet rather than a generic one, detectWallets() returns what the browser has available:

const wallets = tribe.detectWallets();
// [{ id: "phantom", name: "Phantom" }, { id: "backpack", name: "Backpack" }]
function WalletLoginButtons() {
const [wallets] = useState(() => tribe.detectWallets());
const [loading, setLoading] = useState(false);
if (wallets.length === 0) return null;
const handleClick = async () => {
setLoading(true);
try {
const { user } = await tribe.loginWithWallet();
console.log("Logged in:", user.walletAddress);
} catch (err) {
console.error("Wallet login failed:", err);
} finally {
setLoading(false);
}
};
return (
<>
{wallets.map((wallet) => (
<button key={wallet.id} onClick={handleClick} disabled={loading}>
{loading ? "Signing..." : `Sign in with ${wallet.name}`}
</button>
))}
</>
);
}

Wallet login is fully pseudonymous. The wallet address itself is stored (it’s needed for payment flows and already public on the blockchain), but no email or other personal information is collected.

After signing in with a wallet, the session contains:

  • user.emailnull
  • user.walletAddress → the wallet’s public key
  • user.pseudonymousId → stable hashed identifier