useWalletProviderAuth

Allows you to authenticate a wallet address via signed message with nonce. Wallet authentication is requested and processed by Provider API. Requires an App ID, each JWT token is unique per app

// Import
import { useWalletAuth } from "@xircus-web3/react" 

// Declare
const auth = useWalletProviderAuth()
// or { auth, authenticating } = useWalletAuth() 

// Usage
return <button onClick={auth.auth}>{auth.authenticating ? 'Authenticating' : 'Authenticate'}</button>

Last updated