PHPackages                             zbkm/siwe - 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. zbkm/siwe

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

zbkm/siwe
=========

Ethereum Authentication for PHP

v0.5.0(6mo ago)1405↑150%1MITPHPPHP &gt;=8.2CI passing

Since Nov 6Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/zbkm/siwe)[ Packagist](https://packagist.org/packages/zbkm/siwe)[ RSS](/packages/zbkm-siwe/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (5)Versions (8)Used By (0)

Sign-In with Ethereum PHP
=========================

[](#sign-in-with-ethereum-php)

This package provides a PHP implementation of EIP-4361: Sign In With Ethereum.

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

[](#installation)

```
composer require zbkm/siwe
```

Usage
-----

[](#usage)

1. The wallet is connected to the client, then the wallet address is sent to the server
2. On the server we generate SIWE messages.

```
$params = new SiweMessageParams(
    address: $address,
    chainId: 1,
    domain: "example.com",
    uri: "https://example.com/path"
);
```

or with params builder:

```
$params = SiweMessageParamsBuilder::create()
            ->withAddress($address)
            ->withChainId(1)
            ->withDomain("example.com")
            ->withUri("https://example.com/path")->build();
```

And we generate the message text:

```
$message = SiweMessage::create($params);
```

3. On the client side, we sign the SIWE message via personal\_sign. We send the received signature to the server.
4. All that remains is to check the signature.

```
if (SiweMessage::verify($params, $signature)) {
    // authorization success
} else {
    // authorization failed (signature invalid)
}
```

You can also look at a fully working [example](example) of authorization using the library.

Links
-----

[](#links)

- [EIP-4361 Specification](https://eips.ethereum.org/EIPS/eip-4361).
- [Example of use](example)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance67

Regular maintenance activity

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~60 days

Recently: every ~90 days

Total

7

Last Release

196d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/62c1ce011ba3defde81c842ffcff909e495cd3d18d408704fa7af0bffec67b24?d=identicon)[zbkm](/maintainers/zbkm)

---

Top Contributors

[![zbkm](https://avatars.githubusercontent.com/u/175307050?v=4)](https://github.com/zbkm "zbkm (41 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/zbkm-siwe/health.svg)

```
[![Health](https://phpackages.com/badges/zbkm-siwe/health.svg)](https://phpackages.com/packages/zbkm-siwe)
```

###  Alternatives

[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)[visanduma/nova-two-factor

Nova Two Factor Authentication

56621.3k](/packages/visanduma-nova-two-factor)[openeuropa/oe_authentication

Authentication against the OpenEuropa Authentication service.

17314.8k2](/packages/openeuropa-oe-authentication)

PHPackages © 2026

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