PHPackages                             m1guelpf/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. m1guelpf/laravel-web3-login

ActiveLibrary

m1guelpf/laravel-web3-login
===========================

Allow your users to login with their Ethereum wallets

v1.1.0(2y ago)10558525MITPHPPHP ^8.0

Since Mar 22Pushed 2y ago4 watchersCompare

[ Source](https://github.com/m1guelpf/laravel-web3-login)[ Packagist](https://packagist.org/packages/m1guelpf/laravel-web3-login)[ Docs](https://github.com/m1guelpf/laravel-web3-login)[ GitHub Sponsors](https://github.com/m1guelpf)[ RSS](/packages/m1guelpf-laravel-web3-login/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (9)Versions (4)Used By (0)

Allow your users to login with their Ethereum wallet
====================================================

[](#allow-your-users-to-login-with-their-ethereum-wallet)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d7307d7b66d545c7e5be0679e0d4ea8b8b23722c4718790e923df3bb44ec8c2a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d316775656c70662f6c61726176656c2d776562332d6c6f67696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/m1guelpf/laravel-web3-login)[![Total Downloads](https://camo.githubusercontent.com/9ed26df2fa753eb6a8f6c54153f267dd94ccbe2f631f58576c3808d349964651/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d316775656c70662f6c61726176656c2d776562332d6c6f67696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/m1guelpf/laravel-web3-login)

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

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

[](#installation)

You can install the package via composer:

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

Usage
-----

[](#usage)

This package takes care of everything you need on the backend. While there are many different 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 login, 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),
	});
};
```

Configs
-------

[](#configs)

If you want to change the message that is sent to the user, you can publish the config file and change it.

```
php artisan vendor:publish --provider="M1guelpf\Web3Login\Web3LoginServiceProvider" --tag="config"
```

This command will publish a config file to `config/web3.php` with the following options:

```
[
	// Message that is returned to the user in the /_web3/signature route
	'message' => "Hey! Sign this message to prove you have access to this wallet. This won't cost you anything.\n\nSecurity code (you can ignore this): :nonce:",
	// Routes created by this package
    'routes' => ['login', 'register', 'link', 'signature'],
]
```

For example, if you want to disable user registration through this package, you can remove `register` from `routes` config.

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

[](#contributing)

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

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Miguel Piedrafita](https://github.com/m1guelpf)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~439 days

Total

3

Last Release

1000d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23558090?v=4)[Miguel Piedrafita](/maintainers/m1guelpf)[@m1guelpf](https://github.com/m1guelpf)

---

Top Contributors

[![yudikubota](https://avatars.githubusercontent.com/u/22172999?v=4)](https://github.com/yudikubota "yudikubota (3 commits)")[![m1guelpf](https://avatars.githubusercontent.com/u/23558090?v=4)](https://github.com/m1guelpf "m1guelpf (2 commits)")[![danieltafjord](https://avatars.githubusercontent.com/u/6404500?v=4)](https://github.com/danieltafjord "danieltafjord (1 commits)")[![osbre](https://avatars.githubusercontent.com/u/23292709?v=4)](https://github.com/osbre "osbre (1 commits)")

---

Tags

ethereumlaravelweb3web3m1guelpflaravel-web3-login

### Embed Badge

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

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

###  Alternatives

[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)

PHPackages © 2026

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