Getting Started
Iframe URL
${WEB3KIT_ORIGIN}/oauth/<authToken>/web3-kit
WEB3KIT_ORIGIN— the deployed origin of the auth-central application (production / staging).<authToken>— a single-use OAuth session token obtained from the auth-central backend. This is the same token used in the standard web flow (see Auth flow for how to obtain it).
Minimal embed
<iframe
src="https://auth.example.com/oauth/<authToken>/web3-kit"
title="web3-kit"
style="border:0; width:100%; height:100%"
></iframe>
As soon as the iframe mounts, it sends a WEB3_KIT_INIT message to window.parent. The host must subscribe to message events to receive it. See Protocol for the full message rules and Integration Example for a complete React snippet.
Required setup checklist
Before the iframe can drive authentication for your user, you need:
- A valid
authTokenfrom auth-central for the current OAuth session. - A wallet connector on the host side (wagmi, web3modal, ethers, etc.) capable of:
- returning the user's account address;
- signing an arbitrary string (
personal_signor equivalent).
- A
messageevent listener onwindowthat:- filters inbound messages by
event.origin === WEB3KIT_ORIGIN; - captures
connectionIdfromWEB3_KIT_INIT; - routes subsequent messages by
payload.connectionId.
- filters inbound messages by