General
What is SocketFi?
What is SocketFi?
authenticate(), requestTransaction(), and readContract(). Your users never see a public key or a gas fee selector.Is SocketFi custodial?
Is SocketFi custodial?
What blockchain does SocketFi use?
What blockchain does SocketFi use?
What types of applications is SocketFi designed for?
What types of applications is SocketFi designed for?
Does SocketFi replace my backend?
Does SocketFi replace my backend?
@socketfi/server SDK, which your backend uses to verify SocketFi access tokens.Authentication
How does authenticate() work?
How does authenticate() work?
socketfi.authenticate() opens a SocketFi-hosted authentication flow. The user is prompted to authenticate with a passkey (Face ID, Touch ID, Windows Hello, or a hardware security key). SocketFi then:- Verifies the credential
- Creates or loads the user’s smart wallet
- Returns an
AuthSessioncontaining asocketfiAccessTokenanduserProfilewith the wallet address
What are passkeys?
What are passkeys?
Does authentication create a wallet automatically?
Does authentication create a wallet automatically?
When does a session expire?
When does a session expire?
401 Unauthorized. Your application should detect this and prompt the user to re-authenticate with socketfi.authenticate(). The user will get a new session without losing any wallet data or assets.Should I persist the session?
Should I persist the session?
AuthSession object (which includes the socketfiAccessToken) in localStorage (web) or secure device storage (React Native / Expo). Restore it on app startup so users don’t have to re-authenticate on every visit. See the React Authentication example for the recommended AuthProvider implementation.Does logging out delete the wallet or remove assets?
Does logging out delete the wallet or remove assets?
Smart Wallets
What is a smart wallet?
What is a smart wallet?
Does the wallet address ever change?
Does the wallet address ever change?
What assets can a smart wallet hold?
What assets can a smart wallet hold?
Can users send and receive assets?
Can users send and receive assets?
requestTransaction() to initiate token transfers. The user sees a hosted approval screen showing the recipient, amount, and fees before signing with their passkey. Your application can also display a wallet address so other users or services can send assets to it directly.Transactions
Do all transactions require user approval?
Do all transactions require user approval?
requestTransaction(), SocketFi opens a hosted approval screen where the user reviews the contract address, method, arguments, and fees before signing with their passkey. Read-only operations via readContract() do not require any approval.What happens if the user rejects a transaction?
What happens if the user rejects a transaction?
TRANSACTION_REJECTED or USER_CANCELLED. Your application should catch this error and treat it as a normal user action — show a neutral message and allow the user to retry. Do not log it as an application error.Who pays transaction fees?
Who pays transaction fees?
What is POLICY_VIOLATION?
What is POLICY_VIOLATION?
POLICY_VIOLATION error means the requested transaction was blocked by a spending policy configured on the smart wallet — for example, a per-transaction spending limit was exceeded. Check the policy configuration for your application and explain the restriction to the user.Recovery
What happens if a user loses their device?
What happens if a user loses their device?
Do assets get lost if a user loses their device?
Do assets get lost if a user loses their device?
Does recovery create a new wallet?
Does recovery create a new wallet?
What is credential rotation?
What is credential rotation?
Security
Is SocketFi safe to use in production?
Is SocketFi safe to use in production?
verifyAuth() ensures your server never trusts unverified client-provided identity.Follow the security practices described throughout this documentation — especially server-side token verification and HTTPS — and SocketFi provides a strong security foundation.Why is HTTPS required?
Why is HTTPS required?
localhost for development). If your application is served over plain HTTP in production, passkey authentication will fail entirely.Always deploy your frontend behind TLS. This also protects the Authorization: Bearer tokens your frontend sends to your backend from being intercepted in transit.Should I verify tokens on my backend?
Should I verify tokens on my backend?
socketfiAccessToken your frontend receives must be verified server-side with verifyAuth() before you trust any identity claim. Never accept wallet addresses, user IDs, or any other identity information sent directly from the client — always derive them from the verified token result.What is clearKeyCache() and when should I use it?
What is clearKeyCache() and when should I use it?
clearKeyCache() is a utility exported by @socketfi/server that flushes the internal public key cache. The server SDK caches keys to avoid repeated network lookups on every verifyAuth() call — in normal production use you never need to touch this cache.The function is useful when writing automated tests: call it in a beforeEach or afterAll hook to ensure each test starts with a fresh key fetch rather than cached state.