PHPackages                             sven/super-basic-auth - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. sven/super-basic-auth

ActiveLibrary[HTTP &amp; Networking](/categories/http)

sven/super-basic-auth
=====================

A lightweight package to add basic authentication to your Laravel app.

v2.6.0(2y ago)232.6k↓48%3MITPHPPHP ^8.1CI passing

Since Oct 15Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/svenluijten/super-basic-auth)[ Packagist](https://packagist.org/packages/sven/super-basic-auth)[ RSS](/packages/sven-super-basic-auth/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (16)Used By (0)

[![super-basic-auth](https://user-images.githubusercontent.com/11269635/31586185-1bd6a6b2-b1ce-11e7-97a0-bae16ccb1266.jpg)](https://user-images.githubusercontent.com/11269635/31586185-1bd6a6b2-b1ce-11e7-97a0-bae16ccb1266.jpg)

Super Basic Auth
================

[](#super-basic-auth)

[![Latest Version on Packagist](https://camo.githubusercontent.com/65141312df97a27ef3144e892f10c42582ee0b4f6ee92a3273f41b696843bf05/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7376656e2f73757065722d62617369632d617574682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sven/super-basic-auth)[![Total Downloads](https://camo.githubusercontent.com/caf666f08daa8b88ff60dbe36b4e33421406aad0fbb678d1c62ed250d8b4178a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7376656e2f73757065722d62617369632d617574682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sven/super-basic-auth)[![Software License](https://camo.githubusercontent.com/6c711032aff1ca0eb6b211aa6cb3649ce7fd64a7714e1181d4bb457f9680e7cf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/59e8bd2ba9e071a1da883b04a4e58b24110ae6521589b771939ff25fa76bd808/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7376656e6c75696a74656e2f73757065722d62617369632d617574682f72756e2d74657374732e796d6c3f7374796c653d666c61742d737175617265)](https://github.com/svenluijten/super-basic-auth/actions/workflows/run-tests.yml)[![StyleCI](https://camo.githubusercontent.com/c019ffb14124a23a6eb634ae9a37ba65474bd37f2414ae7fdb678e7aa581a677/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130373032333632362f736869656c64)](https://styleci.io/repos/107023626)

This is a super lightweight package to add the most basic form of authentication to your Laravel app. All you need is a webserver and a text editor!

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

[](#installation)

The installation instructions for this package can be found below.

### Downloading

[](#downloading)

Via [composer](http://getcomposer.org):

```
$ composer require sven/super-basic-auth
```

Or add the package to your dependencies in `composer.json` and run `composer update` on the command line to download it:

```
{
    "require": {
        "sven/super-basic-auth": "^2.3"
    }
}
```

Usage
-----

[](#usage)

To use this package, first add the following code to your `config/auth.php` file:

```
return [
    // ...

    'basic' => [
        'user' => env('AUTH_USERNAME'),
        'password' => env('AUTH_PASSWORD'),
    ],
];
```

Be sure to add `AUTH_USERNAME` and `AUTH_PASSWORD` to your `.env` file. You can call these entries whatever you want.

Finally, apply the middleware to any route you want protected by those credentials:

```
Route::group('admin', function () {
    // Your password protected routes.
})->middleware(\Sven\SuperBasicAuth\SuperBasicAuth::class);
```

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

[](#contributing)

All contributions (pull requests, issues and feature requests) are welcome. Make sure to read through the [CONTRIBUTING.md](CONTRIBUTING.md) first, though. See the [contributors page](../../graphs/contributors) for all contributors.

License
-------

[](#license)

`sven/super-basic-auth` is licensed under the MIT License (MIT). Please see the [license file](LICENSE.md) for more information.

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance59

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 52.4% 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 ~279 days

Recently: every ~505 days

Total

12

Last Release

61d ago

Major Versions

v1.1.0 → v2.0.02018-11-12

PHP version history (4 changes)1.0.0PHP &gt;=7.0

v2.0.0PHP ^7.1.3

v2.4.0PHP ^7.4 || ^8.0

v2.6.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/6682e025b83b7a93b4d43c5c9b0b2245d790d72352758c47b81ba14858f45a8a?d=identicon)[svenluijten](/maintainers/svenluijten)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (55 commits)")[![svenluijten](https://avatars.githubusercontent.com/u/11269635?v=4)](https://github.com/svenluijten "svenluijten (50 commits)")

---

Tags

authenticationbasic-authhttp-authlaravellaravel-authenticationlaravel-packagehttplaravelauthAuthenticationpassworduserbasic

### Embed Badge

![Health badge](/badges/sven-super-basic-auth/health.svg)

```
[![Health](https://phpackages.com/badges/sven-super-basic-auth/health.svg)](https://phpackages.com/packages/sven-super-basic-auth)
```

###  Alternatives

[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k16.4M48](/packages/lab404-laravel-impersonate)[middlewares/http-authentication

Middleware to implement Basic and Digest Http authentication

35302.0k2](/packages/middlewares-http-authentication)[jsdecena/laravel-passport-multiauth

Simple laravel passport multiple user authentication

501.1k](/packages/jsdecena-laravel-passport-multiauth)[behamin/service-proxy

for proxy or sending requests to other services with useful utilities

102.2k](/packages/behamin-service-proxy)

PHPackages © 2026

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