Overview
The x404-Blacklist feature verifies that a user does NOT hold any tokens from a blacklist of excluded token addresses. This is useful for preventing access from users who hold scam tokens, competitor tokens, or other unwanted assets.Import
Usage
Configuration
Array of token mint addresses that the user must NOT hold. If the user holds
any of these tokens, authentication will fail.
Object mapping token mint addresses to maximum allowed holdings. Keys are mint addresses, values are maximum amounts as strings.Example:
{ "token_address": "1000" } means user can hold at most 1000 of that token.Optional wallet name. If not provided, a modal will automatically appear for
wallet selection. Supported wallets:
"phantom", "solflare", "backpack"Geolocation code setting. Set to
"true" to enable geolocation checks,
"false" to disable.Country code for geolocation filtering. Empty string if not using geolocation.
User’s coordinates. Use
getGeolocationData() from utilities to get this.Response
Whether authentication was successful
JWT token (if successful). Stored in localStorage as
sjwt404_blacklistWhether user was already authenticated (token exists in localStorage)
Error type if authentication failed
Human-readable error message
Error Types
LOCATION_ERROR
Error accessing user’s geolocation
Example: React Component
Token Storage
The authentication token is automatically stored inlocalStorage with the key sjwt404_blacklist. On subsequent authentication attempts, if a valid token exists, the function will return immediately with alreadyAuthenticated: true.
Next Steps
View Other Features
Explore other authentication features
API Reference
View complete API documentation