Skip to main content

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

string[]
required
Array of token mint addresses that the user must NOT hold. If the user holds any of these tokens, authentication will fail.
Record<string, string>
required
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.
string
Optional wallet name. If not provided, a modal will automatically appear for wallet selection. Supported wallets: "phantom", "solflare", "backpack"
string
required
Geolocation code setting. Set to "true" to enable geolocation checks, "false" to disable.
string
required
Country code for geolocation filtering. Empty string if not using geolocation.
{ latitude: number | null, longitude: number | null }
required
User’s coordinates. Use getGeolocationData() from utilities to get this.

Response

boolean
Whether authentication was successful
string
JWT token (if successful). Stored in localStorage as sjwt404_blacklist
boolean
Whether user was already authenticated (token exists in localStorage)
string
Error type if authentication failed
string
Human-readable error message

Error Types

Error accessing user’s geolocation

Example: React Component

Token Storage

The authentication token is automatically stored in localStorage 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