- The user authenticates with a signature
- The SDK returns a JWT that your backend verifies to confirm the user’s identity
- The backend returns trusted data that can be used for sensitive actions
This differs from the Context API, which provides instant access to user information without authentication but cannot be trusted for sensitive operations.
Implementation
Step 1: Frontend Authentication
This code authenticates the user with Quick Auth, stores the JWT in memory, and uses it to verify the user’s identity with your backend.App.tsx
Step 2: Backend Verification
Install the Quick Auth client:@farcaster/quick-auth
package.
route.tsx