Incremental Authorization (React)
Picket can incrementally authorize users for different NFTs, SPL tokens, and more!
The best example of incremental authorization is a Web3 community site. Imagine every NFT has an exclusive community site. Only token holders can access their NFTs' respective communities and content. With an infinite number of possible NFT-based communities, it would be impossible to check if a user has access to every community on the site at once; instead, we want to verify a user's token ownership incrementally.
git clone https://github.com/picketapi/picket-example-incremental-auth.git
From the root directory, run
echo "NEXT_PUBLIC_PICKET_PUBLISHABLE_KEY=YOUR_PUBLISHABLE_KEY_GOES_HERE" >> .env
npm run dev
You can start editing the page by modifying
pages/index.tsx. The page auto-updates as you edit the file. Feel free to modify the app as much as you like to learn about Picket.
One idea for how to change the app is to add a token that you have access to!
Modifying the Demo Tokens
For the demo, we picked three popular Ethereum mainnet tokens: ENS, Doodles, and BYAC. You'll find these tokens defined at the top of
const tokens = [
"Ethereum Name Service is decentralised naming for wallets, websites, & more",
"Doodles is a community-driven collectibles project featuring art by Burnt Toast",
// Replace BYAC with Okay Zombie Bears Club
name: "Okay Zombie Bears Club",
"Infected, diseased, dead, and brought back to life. Join the Zombie Bear Club.",