AutoConnect

Automatically connects the last connected wallet in the case a user reloads the page or revisits the app at a later time.

This component has no UI, simply mount it anywher in your app to trigger the auto connection flow on page load.

Example

import { createWallet, inAppWallet } from "thirdweb/wallets";
import { AutoConnect } from "thirdweb/react";
// wallets used in your app
const wallets = [
inAppWallet(),
createWallet("io.metamask"),
createWallet("com.coinbase.wallet"),
createWallet("me.rainbow"),
];
function Example() {
return (
<AutoConnect
client={client}
timeout={10000}
wallets={wallets}
appMetadata={appMetadata}
/>
);
}

Props