PHPackages                             soumen-dey/api-authenticator - 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. soumen-dey/api-authenticator

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

soumen-dey/api-authenticator
============================

A Laravel auth package for API authentication.

v1.0(7y ago)021MITPHP

Since Sep 25Pushed 7y agoCompare

[ Source](https://github.com/soumen-dey/api-authenticator)[ Packagist](https://packagist.org/packages/soumen-dey/api-authenticator)[ Docs](https://github.com/soumen-dey/api-authenticator)[ RSS](/packages/soumen-dey-api-authenticator/feed)WikiDiscussions master Synced 2w ago

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

Authenticator
=============

[](#authenticator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/231f2050a655058e8fdecfa6f1f2861bcbe2efb9fb4e09492c34e552be69fd1f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f756d656e2d6465792f6170692d61757468656e74696361746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/soumen-dey/api-authenticator)[![Total Downloads](https://camo.githubusercontent.com/e6d6a99579ffa13afc10a185c360bd73ee5d4bba8fe0a7a985e7c03285690bc4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f756d656e2d6465792f6170692d61757468656e74696361746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/soumen-dey/api-authenticator)[![Build Status](https://camo.githubusercontent.com/55b5be3e994a0d0cfcc7fc0edfb57297f9c7834df5bbe60eee95256f26ea70fa/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f736f756d656e2d6465792f6170692d61757468656e74696361746f722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/soumen-dey/api-authenticator)[![StyleCI](https://camo.githubusercontent.com/cb13a877afd1dbe223c631789c3f922d3ace958fdb334a9cce9b26afefbc2ebd/68747470733a2f2f7374796c6563692e696f2f7265706f732f31323334353637382f736869656c64)](https://styleci.io/repos/12345678)

A Laravel package for API Authentication based on Laravel Passport.

##### **Note**: This package requires Laravel Passport to be installed.

[](#note-this-package-requires--laravel-passport-to-be-installed)

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

[](#installation)

Via Composer

```
$ composer require soumen-dey/api-authenticator
```

Usage
-----

[](#usage)

#### Functionality

[](#functionality)

This package uses the default implementation for Auth that Laravel ships out of the box for validation and various other purposes.

So the validation, user table structure (except for the tokens part) should be similar for both web and api.

**Note:** This package uses the default `User` model in the `App\User`namespace. Feel free to modify the source code if you want to change this.

#### Adding the routes:

[](#adding-the-routes)

In your `routes/api.php` file, add the following:

```
Authenticator::routes();
```

This will add the required routes which are:

```
POST api/register
POST api/login
```

Note: Make sure that your request has these headers:

```
Content-Type: application/json
X-Requested-With: XMLHttpRequest
```

These are the API endpoints for authenticating users. The payload for these endpoints should be same as for the web auth, any extra payload depends on the application's logic.

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

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

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Soumen Dey](https://github.com/soumen-dey)
- [All Contributors](../../contributors%5D)

License
-------

[](#license)

license. Please see the [license file](license.md) for more information.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Total

2

Last Release

2605d ago

Major Versions

v0.1 → v1.02019-05-13

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/27819155?v=4)[Soumen](/maintainers/soumen-dey)[@soumen-dey](https://github.com/soumen-dey)

---

Top Contributors

[![soumen-dey](https://avatars.githubusercontent.com/u/27819155?v=4)](https://github.com/soumen-dey "soumen-dey (5 commits)")

---

Tags

apilaravelauthauthenticator

### Embed Badge

![Health badge](/badges/soumen-dey-api-authenticator/health.svg)

```
[![Health](https://phpackages.com/badges/soumen-dey-api-authenticator/health.svg)](https://phpackages.com/packages/soumen-dey-api-authenticator)
```

###  Alternatives

[auth0/login

Auth0 Laravel SDK. Straight-forward and tested methods for implementing authentication, and accessing Auth0's Management API endpoints.

2745.2M3](/packages/auth0-login)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6783.6k5](/packages/hasinhayder-tyro)

PHPackages © 2026

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