Skip to content

gip/worlddev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WorldDev

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.

Usage

The package has been designed to make it as easy as possible to add authentication to your mini app. You need to:

  1. Add the package to your project
  2. Wrap your app with the WorldAuthProvider
  3. Use the useWorldAuth() hook
  4. 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.

Access the example miniapp

Code

Web

World App

About

Authentication and payment abstraction for World mini apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published