For users who already have wallets, Privy supports signing in with Ethereum (SIWE) or Solana (SIWS). With this flow, users who are already onchain can bring their existing wallet to your app, verify ownership of assets, and take onchain actions.
To have users login to your app with a wallet, use the login method from the usePrivy hook.
Login with wallet is only available using Privy UIs, explore our UI components here.
Currently, Ledger Solana hardware wallets only support transaction signatures, not the message signatures required
for Sign-In With Solana (SIWS) authentication. In order to authenticate with a Solana Ledger wallet,
you will need to mount the following hook in your application:
Copy
Ask AI
import {useSolanaLedgerPlugin} from '@privy-io/react-auth/solana';...// Ensure this is mounted throughout the entire sign in flowuseSolanaLedgerPlugin();
Then, when you attempt to login with a Phantom Solana wallet, you will be prompted to indicate whether you are signing with a Ledger wallet,
which will initiate a separate SIWS flow wherein which a no-op transaction will be signed and used for verification.