Casdoor集成市场

Web3 Wallet Sign-In | OAuth 提供商

Sign in with an Ethereum wallet

People click the wallet button on the Casdoor sign-in page, pick a wallet installed in their browser and sign a one-time Sign-In with Ethereum (EIP-4361) message. Casdoor checks the signature and signs them in as the wallet address. Nothing is sent to the blockchain, so there is no fee and no RPC node to run.

Casdoor 官方核验商业版Web3EthereumMetaMaskSIWE
你需要一个正在运行的 Casdoor,自己部署或用 Casdoor 云都可以。示例中的 https://auth.example.com 请换成你的 Casdoor 地址(Casdoor 云上类似 https://acme.casdoor.com),其他 example.com 地址也换成你自己的。

用 Casdoor 配置 Web3 Wallet Sign-In

  1. 1

    Install the plugin

    In the Marketplace of your Casdoor, install Web3 Wallet Sign-In. It needs a commercial or enterprise edition license, and adds an OAuth provider of type Plugin named after the integration.

  2. 2

    Leave the Auth URL empty

    Open the new provider. The plugin signs in on the sign-in page itself, so keep Auth URL empty, and leave Client ID and Client secret empty too. To offer only some wallets, put their EIP-6963 names in Metadata:

    Metadata (optional){"wallets": ["io.metamask"]}
  3. 3

    Add it to the application

    Add the provider to the Providers of your application and save. The sign-in page now shows the wallet button; users can also link a wallet to an existing account on their profile page.

注意事项

  • The wallet address is the account ID, so the same wallet signs in to the same user in each organization; a new wallet signs up when the application allows sign-up.
  • The message names the domain of the sign-in page and expires after 5 minutes, and each one can be used once, so a signature captured elsewhere can't be replayed.
  • On a phone without a wallet extension, the button offers to open the page in the in-app browser of MetaMask or Coinbase Wallet.
  • Smart contract wallets that sign with EIP-1271 instead of a key, such as Safe, are not supported.

Web3 Wallet Sign-In 的设置取自它的官方文档(核对于 2026年11月:EIP-4361: Sign-In with Ethereum、EIP-6963: Multi Injected Provider Discovery、MetaMask: Sign data (personal_sign))。Web3 Wallet Sign-In 是其所有者的商标。