Incremental Authorization (React)
Picket can incrementally authorize users for different NFTs, SPL tokens, and more!
Last updated
Picket can incrementally authorize users for different NFTs, SPL tokens, and more!
Last updated
Live Demo
View the end-result of this tutorial at live at
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.
You can read more about in the documentation.
From the root directory, run
If you don't know about Picket API keys, checkout the the
Copy the Publishable Key from on of your projects
Create a local .env
file with your API key by running
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 pages/index.tsx
.
Congrats
You now have a working incremental authorization codebase to start hacking on!
Navigate to the .
Open with your browser to see the result.
Let's say we want to remove BYAC in favor of the . We can do this by modifying the tokens
variable in pages/index.tsx
Open with your browser to see the result. is an example NFT, but try it out with an NFT or SPL token that you own!
If you have any more questions or run into issue, don't hesitate to reach out to