WordPress powers 43% of the web. If web3 is to reach mass adoption – and fulfill the institutional scope it envisions – it’s clear that these two technological forces will need to intersect in some way.
WP Rainbow is a WordPress plugin that allows users to log in with Ethereum using the Sign-In With Ethereum standard. The plugin uses RainbowKit to provide the primary connection interface. Wanna give it a try? Click the button below, or head on over to the login page.
Built by the team at Rainbow, RainbowKit allows users to employ their wallet of choice to interact with Ethereum. RainbowKit extends the web3 library wagmi to offer a complete toolkit for building a web3-enabled application.
I have used Rainbow since getting into web3 in spring 2021 and think it’s the best wallet out there – I was won over by its delightful interface, powerful product, and expansive vision for what a wallet can be. If you aren’t using Rainbow yet, head on over to their website and check it out.
For this plugin, the integration boils down to a few simple parts:
- An extra element on the WordPress login form
- A small React application that injects into that element
- An integration with RainbowKit in the application
- A couple of backend APIs to provide a nonce and verify sign-in
On the backend, the plugin uses Elliptic PHP to verify that the message was signed by the same address being used to login. For an example of what this looks like in PHP, check out this unit test. If the address has an ENS name setup, it will be used as the WordPress user’s display name.
Full Disclosure: This project is not officially affiliated with Rainbow.
Updated 4/30 to include example of the new login button released in v0.0.6.