Starter kit for building World Mini Apps.
next-world-auth is a package that offers authentication and payment abstraction for World mini apps. In a few lines of code, you have a miniapp with persistent sessions that can be deployed and added to the World App Store.
The API is currently unstable and may change without notice.
The package has been designed to make it as easy as possible to add authentication to your mini app. You need to:
- Add the package to your project
- Wrap your app with the
WorldAuthProvider - Use the
useWorldAuth()hook - If you want to use signInWorldID(), a few environment variables needs to be set for the callback URL and the secret key
import { useWorldAuth } from 'next-world-auth/react'
export default function Home() {
const { isInstalled,
isAuthenticated,
session,
signInWorldID,
signInWallet,
signOut,
getLocation } = useWorldAuth()
return (<>
...
</>)
}The session value is of type Session | null. Refer to this file for more information.