Docs
Integrate Web3 Auth into any app using your publishable key. API: https://api.coinuspay.com
1) Install SDK (React)
npm i web3-auth-sdk
2) Wrap your app
import { Web3AuthProvider } from "web3-auth-sdk";
export default function Root() {
return (
<Web3AuthProvider
apiUrl="https://api.coinuspay.com"
publishableKey="pk_test_..."
>
<App />
</Web3AuthProvider>
);
}3) Add a Sign-In button
import { SignInButton } from "web3-auth-sdk";
export default function Login() {
return <SignInButton />;
}Button color + text come from the dashboard settings.
Session strategies
Local mode
- Token stored in localStorage
- Best for dev/demo
- Fast setup
Production mode
- HttpOnly cookie session
- Use /v1/auth/me to fetch user
- Safer for real deployments
API Endpoints (Core)
POST /v1/auth/challenge POST /v1/auth/verify GET /v1/auth/me POST /v1/auth/logout
Dashboard settings (what they do)
- allowedDomains: Only these origins can request challenges
- chains: Restrict which chain the user must be on (managed/custom)
- nonceTtlSec: Challenge lifetime (replay protection)
- sessionTtlSec: JWT/cookie session lifetime
- signInMessageTemplate: Custom message that gets signed
- themeColor & buttonText: UI customization across all integrators