This guide is for the React SDK only
Overview
If you’re launching a new site or want to restrict parts of your site to a predefined list of users, then access lists or waitlists are probably a high priority for you. Leveraging gating with access lists through the Dynamic dashboard is a simple no-code option that gives you flexibility to define and manage various lists easily. Through your dashboard, you can:- Restrict site access based on a list of emails, wallet addresses, or other unique identifiers.
- Return a scope in the JWT of emails, wallet addresses, or other unique identifiers.
General Setup
Find the Access Control tab via the Configurations page of your developer dashboard. Here you can create access lists based on emails or wallet addresses.- Click “Create new gate”
- Name your gate
- Select the gating method:
- Allow Site Access - this option will block users from access your site (we won’t generate a JWT) unless the criteria is met
- Return scope - this option will not block users, but instead will return the JWT with a predefined scope if the user has met the defined criteria
- Choose the type of identifier (email, wallet address, or other).
- Enter the identifier.
- You can also add an alias to more easily keep track of these users.
- Click the “Add +” button to save the user to the list. Keep adding users as needed.
- Save and enable the toggle when you’re ready.
- You’re done!
Using your UI
Use headless SDK methods to check a user’s scopes and conditionally render content in your app.You can use the You can also return a completely custom button by passing an element to the The button should adhere to the following type:
useDynamicScopes
hook to check for user scopes returned in the JWT.React
Customize the copy and button
You can customize the copy through props by updating theaccessDeniedMessagePrimary
and accessDeniedMessageSecondary
.React
accessDeniedButton
prop. Here’s an example to link to a contact page:React
React