PHPackages                             kevinpurwito/laravel-web3-login - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. kevinpurwito/laravel-web3-login

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

kevinpurwito/laravel-web3-login
===============================

Allow your users to login with their Web3 wallets

v1.2.0(4y ago)2145MITPHP ^8.0

Since Mar 22Compare

[ Source](https://github.com/kevinpurwito/laravel-web3-login)[ Packagist](https://packagist.org/packages/kevinpurwito/laravel-web3-login)[ Docs](https://github.com/kevinpurwito/laravel-web3-login)[ Fund](https://www.paypal.me/kevinpurwito)[ RSS](/packages/kevinpurwito-laravel-web3-login/feed)WikiDiscussions Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (4)Used By (0)

Allow your users to log in with their Web3 wallet
=================================================

[](#allow-your-users-to-log-in-with-their-web3-wallet)

[![Code Style](https://github.com/kevinpurwito/laravel-web3-login/actions/workflows/php-cs-fixer.yml/badge.svg?branch=main)](https://github.com/kevinpurwito/laravel-web3-login/actions/workflows/php-cs-fixer.yml)[![Psalm](https://github.com/kevinpurwito/laravel-web3-login/actions/workflows/psalm.yml/badge.svg?branch=main)](https://github.com/kevinpurwito/laravel-web3-login/actions/workflows/psalm.yml)[![Latest Version on Packagist](https://camo.githubusercontent.com/20fac8dbf58446176111896667f7c62c4e10643cf04d95392bf997f17e434592/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6576696e7075727769746f2f6c61726176656c2d776562332d6c6f67696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kevinpurwito/laravel-web3-login)[![Total Downloads](https://camo.githubusercontent.com/7cc385f80f167e30db5370574f374d265bc71a7240923c5f7fe92cda3c15fdad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6576696e7075727769746f2f6c61726176656c2d776562332d6c6f67696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kevinpurwito/laravel-web3-login)

Allow your users to link their Web3 wallet to their account to skip entering their login credentials.

This package is forked from the [m1guelpf/laravel-web3-login](https://github.com/m1guelpf/laravel-web3-login)with some modifications.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require kevinpurwito/laravel-web3-login
```

### Configuration

[](#configuration)

The `vendor:publish` command will publish a file named `web3.php` within your laravel project config folder `config/web3.php`. Edit this file with your desired column name for the table, defaults to `wallet`.

Published Config File Contents

```
[
    'wallet_address_column' => env('WEB3_WALLET_ADDRESS_COLUMN', 'address'),
];
```

Alternatively you can ignore the above publish command and add this following variables to your `.env` file.

```
WEB3_WALLET_ADDRESS_COLUMN=wallet

```

Usage
-----

[](#usage)

This package takes care of everything you need on the backend. While there are many ways of asking the user to sign a message with their wallet, we'll be using `web3modal` and `ethers` to maximize the support for wallet providers.

To get started, you need to have the user register a new credential. You can do so by presenting them with a modal when they log in, or by adding the option to their settings page.

```
import axios from "axios";
import {ethers} from "ethers";
import Web3Modal from "web3modal";

const web3Modal = new Web3Modal({
	cacheProvider: true,
	providerOptions: {}, // add additional providers here, like WalletConnect, Coinbase Wallet, etc.
});

const onClick = async () => {
	const message = await axios.get("/_web3/signature").then((res) => res.data);
	const provider = await web3Modal.connect();

	provider.on("accountsChanged", () => web3Modal.clearCachedProvider());

	const web3 = new ethers.providers.Web3Provider(provider);

	axios.post("/_web3/link", {
		address: await web3.getSigner().getAddress(),
		signature: await web3.getSigner().signMessage(message),
	});
};
```

Then, on the login page, you can provide an option to log in with their wallet.

```
import axios from "axios";
import {ethers} from "ethers";
import Web3Modal from "web3modal";

const web3Modal = new Web3Modal({
	cacheProvider: true,
	providerOptions: {}, // add additional providers here, like WalletConnect, Coinbase Wallet, etc.
});

const onClick = async () => {
	const message = await axios.get("/_web3/signature").then((res) => res.data);
	const provider = await web3Modal.connect();

	provider.on("accountsChanged", () => web3Modal.clearCachedProvider());

	const web3 = new ethers.providers.Web3Provider(provider);

	axios.post("/_web3/login", {
		address: await web3.getSigner().getAddress(),
		signature: await web3.getSigner().signMessage(message),
	});
};
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](.github/SECURITY.md) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- Original Author: [Miguel Piedrafita](https://github.com/m1guelpf)
- Modified by: [Kevin Purwito](https://github.com/kevinpurwito)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~166 days

Total

3

Last Release

1546d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47e3d5e05f33c7b66c0c646fbce5dac5a319a8fd7ebb13977d2a1ae3df91e9a4?d=identicon)[kevinpurwito](/maintainers/kevinpurwito)

---

Top Contributors

[![kevinpurwito](https://avatars.githubusercontent.com/u/11625012?v=4)](https://github.com/kevinpurwito "kevinpurwito (6 commits)")[![m1guelpf](https://avatars.githubusercontent.com/u/23558090?v=4)](https://github.com/m1guelpf "m1guelpf (2 commits)")[![osbre](https://avatars.githubusercontent.com/u/23292709?v=4)](https://github.com/osbre "osbre (1 commits)")

---

Tags

laravelweb3kevinpurwitolaravel-web3-login

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kevinpurwito-laravel-web3-login/health.svg)

```
[![Health](https://phpackages.com/badges/kevinpurwito-laravel-web3-login/health.svg)](https://phpackages.com/packages/kevinpurwito-laravel-web3-login)
```

###  Alternatives

[imdhemy/laravel-purchases

The top-notch Laravel receipt validator.

3831.1M2](/packages/imdhemy-laravel-purchases)[martbock/laravel-diceware

Diceware Passphrase Generator for Laravel

3264.7k](/packages/martbock-laravel-diceware)[orchestra/auth

Auth Component for Orchestra Platform

24108.5k3](/packages/orchestra-auth)[ingria/laravel-x509-auth

Laravel 5 Client Certificate auth middleware

375.6k](/packages/ingria-laravel-x509-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
