Resources
Worldcoin Mini Apps Docs
Official documentation for building Worldcoin Mini Apps.
Worldcoin Developer Portal
Register your mini app and manage API keys.
Privy React Setup
Learn how to set up Privy in your React app.
Configure your Worldcoin developer portal
Create a Worldcoin developer account and mini app, learn more here.Get set up with Privy
If you haven’t set up Privy yet, follow our React quickstart guide
to get your app ID and configure your app.
Set up with Worldcoin Mini App
1
Create your mini app using the quickstart
Scaffold a new Worldcoin Mini App using the official template:Follow the prompts in the README to set up your app. Use the env variables from your Worldcoin developer portal to configure your app.
2
Explore the starter repo structure
Your new app will have a file at
src/components/AuthButton/index.tsx
—this is where you’ll add
Privy SIWE support.SIWE into mini app with Privy
We will be using theuseLoginWithSiwe
hook to handle the SIWE flow.
1
Get the nonce from Privy
Use the This nonce will be used to ensure the SIWE message is unique and secure.
generateSiweNonce
function from Privy to get a unique nonce for the SIWE flow.2
Pass the nonce to Worldcoin walletAuth
Use the Worldcoin MiniKit to trigger the wallet authentication flow, passing in the nonce you just received.This will prompt the user to sign a SIWE message in their World App wallet.
3
Send the signed message and signature to Privy
Take the response from Worldcoin (the signed message and signature) and send it to Privy to complete authentication.This will log the user in via Privy using the SIWE flow.
4
Access the user session data
Once logged in, you can access the user’s worldcoin information and wallet data. For example, to get user info from Worldcoin:
Your Worldcoin Mini App now supports SIWE authentication with Privy and World App! Enjoy seamless,
secure onboarding for your users 🚀