@coinlist-co/react package is the recommended way to integrate Passage in React and Next.js apps with a backend. It gives you OAuth with PKCE on the client, token exchange and sessions on the server, and ready-made UI for common flows.
For a linear walkthrough, start with SDK quickstart.
Requirements
- React 18+ and React DOM 18+ (peer dependencies)
- A backend you control to store
client_secret, exchange authorization codes, and keep refresh tokens out of the browser
Install
Entry points
The package exposes three canonical entry points:
Most apps import everything they need from
@coinlist-co/react. Reach for /server only inside server-side code, and /shared when you want a domain type without pulling the client bundle. Sub-path imports like @coinlist-co/react/client/components and /client/hooks were removed in v0.5.0 - see the React SDK changelog.
Client namespaces
Methods on the client are grouped into namespaces by what they operate on.
The namespaces arrived in v0.10.0, which moved the flat participation methods under
tokenSale and the ERC-20 reads from swap to erc20. See the changelog for the migration table.
Next steps
SDK quickstart
Credentials, install, and architecture in one place.
Set up OAuth authentication
End-to-end sign-in with backend session.
Allowlist a wallet
Prove wallet ownership and register it against an offer.
Errors and edge cases
Every error shape the flows return, and how to handle them.