Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davisshaver/wp-rainbow
WordPress Plugin to Enable Sign-In With Ethereum using RainbowKit
https://github.com/davisshaver/wp-rainbow
siwe web3 wordpress
Last synced: 2 months ago
JSON representation
WordPress Plugin to Enable Sign-In With Ethereum using RainbowKit
- Host: GitHub
- URL: https://github.com/davisshaver/wp-rainbow
- Owner: davisshaver
- Created: 2022-03-18T19:42:35.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-04T17:06:31.000Z (8 months ago)
- Last Synced: 2024-06-04T19:10:01.771Z (8 months ago)
- Topics: siwe, web3, wordpress
- Language: JavaScript
- Homepage: https://wp-rainbow.davisshaver.com/
- Size: 4.82 MB
- Stars: 7
- Watchers: 4
- Forks: 5
- Open Issues: 12
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# RainbowKit Login (Web3 Integration for Sign-In With Ethereum)
[![PHPUnit Tests](https://github.com/davisshaver/wp-rainbow/actions/workflows/phpunit-tests.yml/badge.svg)](https://github.com/davisshaver/wp-rainbow/actions/workflows/phpunit-tests.yml)
Providing a [Sign-In With Ethereum](https://login.xyz/) experience for [WordPress](https://wordpress.org/) using [RainbowKit](https://www.npmjs.com/package/@rainbow-me/rainbowkit).
_Want to try it out? [Head here.](https://wp-rainbow.davisshaver.com/wp-login.php)_
## Installation
The recommended way to install RainbowKit Login is downloading the ZIP file from [the most recent release](https://github.com/davisshaver/wp-rainbow/releases).
## Development
Before you begin, make sure you have [Composer](https://getcomposer.org/) and [Yarn](https://yarnpkg.com/) available.
1. Clone the repository.
`git clone https://github.com/davisshaver/wp-rainbow.git`
2. Change into the directory.
`cd wp-rainbow`
3. Install Composer dependencies.
`composer install`
4. Install Node dependencies with Yarn.
`yarn install`
5. Build the JS files.
`yarn build`
_Note: This plugin requires [GMP](https://www.php.net/manual/en/book.gmp.php) to be available on the server._
## Actions
**`wp_rainbow_validation_failed`** - Fires when validation fails.
**`wp_rainbow_user_created`** - Fires when user created.
**`wp_rainbow_user_updated`** - Fires when user updated.
**`wp_rainbow_user_login`** - Fires when user logs in.
## Filters
Find reference implementations of all filters in [example plugin here](https://github.com/davisshaver/wp-rainbow/blob/main/wp-rainbow-filter-examples.php).
**`wp_rainbow_nonce_life`** - Filter amount of time before nonce expires.
**`wp_rainbow_role_for_address`** - Filter role granted to a specific address on sign-in.
**`wp_rainbow_should_update_roles`** - Filter whether roles should be set.
**`wp_rainbow_rpc_url`** - Filter RPC URL to override settings value.
**`wp_rainbow_rpc_url_mainnet`** - Filter mainnet RPC URL to override settings value.
**`wp_rainbow_infura_id`** - Filter Infura ID to override settings value.
**`wp_rainbow_infura_network`** - Filter Infura network to override settings value.
**`wp_rainbow_redirect_url`** - Filter login redirect URL.
**`wp_rainbow_should_update_roles`** - Filter whether roles should be set.
**`wp_rainbow_should_disable_user_role_updates_on_login`** - Filter whether roles should be updated on login.