Documentation Index
Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
Use this file to discover all available pages before exploring further.
Crossmint provides connectors for the most popular auth providers, including Auth0, Firebase, Supabase, Stytch, Cognito, and Kinde.
When you bring your own auth, Crossmint automatically extracts the user ID from your provider’s JWT and assigns it to the wallet’s owner property. Wallet creation, transaction signing, and balance reads all work the same way regardless of which auth provider you use.
If you are just getting started or prototyping, Crossmint Auth is a great way to move fast in staging before connecting your own provider.
Prerequisites
- API Key: Ensure you have an API key with the scopes:
wallets.create.
Using your own auth provider
React
React Native
Flutter
Configure JWT Authentication in the Crossmint Console
- Navigate to your project in the Crossmint Console.
- Go to the API Keys section from the sidebar.
- Scroll down to the JWT authentication section.
- Choose your preferred authentication method:
- 3P Auth providers: Select from supported providers such as Auth0, Stytch, Cognito, Firebase, Kinde, or Supabase. Enter any required environment IDs or configuration details.
- Custom tokens: Opt to issue and manage your own JWTs.
- After making your selection and providing any necessary details, click Save JWT auth settings to apply your configuration.

Add the Crossmint providers to your app
Add the necessary Crossmint providers to your app together with your own auth provider."use client";
import { useEffect } from "react";
import {
CrossmintProvider,
CrossmintWalletProvider,
useCrossmint,
} from "@crossmint/client-sdk-react-ui";
import { YourAuthProvider, useYourAuthProviderHook } from "@your-auth-provider";
export function Providers({ children }: { children: React.ReactNode }) {
return (
<YourAuthProvider>
<CrossmintProvider apiKey="YOUR_CLIENT_API_KEY">
<CrossmintWalletProvider>
<JwtSync />
{children}
</CrossmintWalletProvider>
</CrossmintProvider>
</YourAuthProvider>
);
}
// Get the JWT from your auth provider and pass it to the Crossmint provider
function JwtSync() {
const { jwt } = useYourAuthProviderHook();
const { setJwt } = useCrossmint();
useEffect(() => {
setJwt(jwt);
}, [jwt]);
return null;
}
Pass the JWT and create or retrieve the wallet
Once the JWT is available, use getWallet to retrieve an existing wallet. If no wallet exists, it throws a WalletNotAvailableError — catch it and call createWallet instead."use client";
import { useYourAuthProviderHook } from "@your-auth-provider";
import { useEffect } from "react";
import { useCrossmint, useWallet } from "@crossmint/client-sdk-react-ui";
import { WalletNotAvailableError } from "@crossmint/wallets-sdk";
export function YourComponent() {
const { email } = useYourAuthProviderHook();
const { jwt } = useCrossmint();
const { getWallet, createWallet } = useWallet();
useEffect(() => {
if (email != null && jwt != null) {
getWallet({ chain: "base-sepolia" }).catch((error) => {
if (error instanceof WalletNotAvailableError) {
createWallet({
chain: "base-sepolia",
recovery: { type: "email", email },
}).catch(console.error);
}
});
}
}, [email, jwt]);
// your component logic here
return (
<div>
<h1>Your Component</h1>
</div>
);
}
getOrCreateWallet has been removed in V1. Use getWallet to retrieve an existing wallet. If it throws a WalletNotAvailableError, call createWallet instead. See the migration guide for details. Configure JWT Authentication in the Crossmint Console
- Navigate to your project in the Crossmint Console.
- Go to the API Keys section from the sidebar.
- Scroll down to the JWT authentication section.
- Choose your preferred authentication method:
- 3P Auth providers: Select from supported providers such as Auth0, Stytch, Cognito, Firebase, Kinde, or Supabase. Enter any required environment IDs or configuration details.
- Custom tokens: Opt to issue and manage your own JWTs.
- After making your selection and providing any necessary details, click Save JWT auth settings to apply your configuration.

Add the Crossmint providers to your app
Add the necessary Crossmint providers to your app together with your own auth provider.import { useEffect } from "react";
import {
CrossmintProvider,
CrossmintWalletProvider,
useCrossmint,
} from "@crossmint/client-sdk-react-native-ui";
import { YourAuthProvider, useYourAuthProviderHook } from "@your-auth-provider";
type ProvidersProps = {
children: React.ReactNode;
};
export default function Providers({ children }: ProvidersProps) {
return (
<CrossmintProvider apiKey="YOUR_CLIENT_API_KEY">
<YourAuthProvider>
<CrossmintWalletProvider>
<JwtSync />
{children}
</CrossmintWalletProvider>
</YourAuthProvider>
</CrossmintProvider>
);
}
// Get the JWT from your auth provider and pass it to the Crossmint provider
function JwtSync() {
const { jwt } = useYourAuthProviderHook();
const { setJwt } = useCrossmint();
useEffect(() => {
setJwt(jwt);
}, [jwt]);
return null;
}
Pass the JWT and create or retrieve the wallet
Once the JWT is available, use getWallet to retrieve an existing wallet. If no wallet exists, it throws a WalletNotAvailableError — catch it and call createWallet instead.import { useYourAuthProviderHook } from "@your-auth-provider";
import { useEffect } from "react";
import { View, Text } from "react-native";
import { useCrossmint, useWallet } from "@crossmint/client-sdk-react-native-ui";
import { WalletNotAvailableError } from "@crossmint/wallets-sdk";
export function YourAuthComponent() {
const { email } = useYourAuthProviderHook();
const { jwt } = useCrossmint();
const { getWallet, createWallet } = useWallet();
useEffect(() => {
if (jwt != null && email != null) {
getWallet({ chain: "base-sepolia" }).catch((error) => {
if (error instanceof WalletNotAvailableError) {
createWallet({
chain: "base-sepolia",
recovery: { type: "email", email },
}).catch(console.error);
}
});
}
}, [jwt, email]);
// your component logic here
return (
<View>
<Text>Your Auth Component</Text>
</View>
);
}
getOrCreateWallet has been removed in V1. Use getWallet to retrieve an existing wallet. If it throws a WalletNotAvailableError, call createWallet instead. See the migration guide for details. Configure JWT Authentication in the Crossmint Console
- Navigate to your project in the Crossmint Console.
- Go to the API Keys section from the sidebar.
- Scroll down to the JWT authentication section.
- Choose your preferred authentication method:
- 3P Auth providers: Select from supported providers such as Auth0, Stytch, Cognito, Firebase, Kinde, or Supabase. Enter any required environment IDs or configuration details.
- Custom tokens: Opt to issue and manage your own JWTs.
- After making your selection and providing any necessary details, click Save JWT auth settings to apply your configuration.

Pass the JWT and create or retrieve the wallet
Flutter’s auth client is headless. Use your own auth provider to obtain the JWT, then pass it to client.auth.setJwt(jwt). The wallet controller auto-loads or creates a wallet when createOnLogin is configured.import 'package:crossmint_flutter/crossmint_flutter_ui.dart';
// Whenever your auth provider produces (or refreshes) a JWT:
Future<void> syncCrossmintAuth(BuildContext context, String? jwt) async {
final walletContext = CrossmintWalletContext.of(context);
await walletContext.requireAuth.setJwt(jwt);
// Optional — lookup or create a wallet once authenticated.
if (jwt == null) return;
final controller = walletContext.requireWalletController;
final existing = await controller.getWallet(
const CrossmintWalletLookupRequest(chain: 'base-sepolia'),
);
if (existing == null) {
await controller.createWallet(
const CrossmintWalletCreateRequest(
chain: 'base-sepolia',
recovery: CrossmintEmailSignerConfig(email: 'YOUR_USER_EMAIL'),
),
);
}
}