antoine.sh/siwe-middleware/front-demo

STEP 1

Connect your wallet

EIP-1193 Provider
This demo calls window.ethereum.request({ method: 'eth_requestAccounts' }) to get the connected wallet address. No popup blocker worries — you click the button, MetaMask handles the rest.
What happens here
// EIP-1193 — standard across MetaMask, Coinbase Wallet, etc.
const [address] = await window.ethereum.request({
    method: 'eth_requestAccounts'
 });
const chainId = await window.ethereum.request({
    method: 'eth_chainId'
}); // e.g. "0x1" for mainnet, "0x89" for Polygon
Logs will appear here...