Skip to main content

Authorization

Enforce that users must sign in with their wallet using auth after connecting their wallet.

Requires the authConfig prop to be set on the ThirdWebProvider component.

Auth Prop OptionTypeDefault ValueOptionsDescription
loginOptionalbooleanfalsetrue or falseAllow users to skip signing in with their wallet.
onLoginfunctionN/AN/ACallback function that is called when a user signs in with their wallet.
onLogoutfunctionN/AN/ACallback function that is called when a user signs out of their wallet.
import { ConnectWallet } from "@thirdweb-dev/react";

function App() {
return (
<ConnectWallet
auth={{
loginOptional: false,
}}
/>
);
}