PHPackages                             net-passport/net-passport - 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. net-passport/net-passport

ActiveLibrary

net-passport/net-passport
=========================

The single line sign on library for youuuu :)

1.1(4y ago)0200proprietaryPHP

Since May 10Pushed 4y ago2 watchersCompare

[ Source](https://github.com/orenz/urban-fiesta)[ Packagist](https://packagist.org/packages/net-passport/net-passport)[ RSS](/packages/net-passport-net-passport/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Net Passport
============

[](#net-passport)

net-passport is a all-strategy (Google, Facebook, etc...) server side authentication using Pure PHP in just a single line of code. You don't need any more boilerplate, repetitive configurations, strategies installations and more. Just use net-passport in your web application and manage your authenticated users! In addition, net-passport gives you a simple way for sign and verify messages using your NetPassport ID.

prerequisites
-------------

[](#prerequisites)

If you don't have one then go to [NetPassport](netpassport.io/signup) and create an account. After that, navigate to Console (on the left):

[![alt text](https://camo.githubusercontent.com/da67d68175631b482d5810cc9fa8a0d9eeedc6f3d15026dee89065e697d1a466/68747470733a2f2f6e657470617373706f72742e696f2f7075626c69632f636f6e736f6c652e504e47 "NetPassport Console")](https://camo.githubusercontent.com/da67d68175631b482d5810cc9fa8a0d9eeedc6f3d15026dee89065e697d1a466/68747470733a2f2f6e657470617373706f72742e696f2f7075626c69632f636f6e736f6c652e504e47)

Then, click on "Generate key pair", scroll down and download the key-pair.

Alternatively, you could upload a private key you generated by yourself.

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

[](#installation)

```
$ composer require net-passport/net-passport
```

Usage
-----

[](#usage)

```
use NetPassport\Signer;
```

Get your netPassportID in [NetPassportHome](netpassport.io/home) on the top right:

[![alt text](https://camo.githubusercontent.com/4875379ed5050e9889dfe8f6ac030212fa08d7a470e607ebf39e60006ed5e90e/68747470733a2f2f6e657470617373706f72742e696f2f7075626c69632f69642e504e47 "NetPassport id")](https://camo.githubusercontent.com/4875379ed5050e9889dfe8f6ac030212fa08d7a470e607ebf39e60006ed5e90e/68747470733a2f2f6e657470617373706f72742e696f2f7075626c69632f69642e504e47)

you could click the "Copy" button to copy the id and paste it inside your code.

### Load you private key

[](#load-you-private-key)

\####load from disk

```
use Lcobucci\JWT\Signer\Key\LocalFileReference;
$privateKey = LocalFileReference::file(__DIR__ . '/path-to-my-key-stored-in-a-file.pem');
```

\####Or load the keys from memory

```
 use Lcobucci\JWT\Signer\Key\InMemory;
$privateKey = InMemory::plainText('my-key-as-plaintext');
```

Server to server authentication
-------------------------------

[](#server-to-server-authentication)

#### Sign data

[](#sign-data)

```
// Initiate your message object
$message = [
  'netPassportID'   => "112233",
  'myData'          => "Hi there",
];

// Pass in two parameters that includes your object message (as mentioned above) and a private key or path to your private key
$signature = Signer::signObject($message, $privateKey);
```

#### Verify data

[](#verify-data)

```
// Pass in two parameters that includes your original object message and the hashed signature of the message
$verifiedMessage = Signer::verify($message, $privateKey);
```

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

Total

2

Last Release

1818d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6067331?v=4)[tht7](/maintainers/tht7)[@tht7](https://github.com/tht7)

---

Top Contributors

[![tht7](https://avatars.githubusercontent.com/u/6067331?v=4)](https://github.com/tht7 "tht7 (2 commits)")

### Embed Badge

![Health badge](/badges/net-passport-net-passport/health.svg)

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

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M72](/packages/kreait-firebase-php)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6503.9M9](/packages/aporat-store-receipt-validator)[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)

PHPackages © 2026

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