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 various 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.
Usage
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!
Working with scopes
To simplify working with scopes, we created a custom hook named useDynamicScopes. It allows you to easily checking the user scopes and to check for a specific scope on a user. To learn more about how to use this hook, see our docs here.Customize the copy and button
You can customize the copy through props in our SDK by updating theaccessDeniedMessagePrimary
and accessDeniedMessageSecondary
.
accessDeniedButton
prop. Here’s an example to link to a contact page: