PHPackages                             andriesreitsma/laravel-visa - 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. andriesreitsma/laravel-visa

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

andriesreitsma/laravel-visa
===========================

My Laravel Passport add-on package

v0.0.1(4y ago)318MITPHPPHP ^7.3|^8.0

Since May 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/andriesreitsma/laravel-visa)[ Packagist](https://packagist.org/packages/andriesreitsma/laravel-visa)[ Docs](https://andriesreitsma.nl)[ RSS](/packages/andriesreitsma-laravel-visa/feed)WikiDiscussions master Synced yesterday

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

laravel-visa
============

[](#laravel-visa)

Add a VISA to your Laravel Passport, to give SPA's sign-in abilities using Passport ... `work in progress`

Add `CreateFreshApiToken` Middleware from `laravel\passport` add the end of all the `web` middleware, this way a cookie will be added to the responses coming from the back-end.

```
    /**
     * The application's route middleware groups.
     *
     * @var array
     */
    protected $middlewareGroups = [
        'web' => [
            ...
            \Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,
        ],
```

Get CSRF Cookie before signing in with regular props

```
    const csrf = () => axios.get('/cookie')
```

Get your csrf cookie before posting to login to acquire a logged-in state

```
    await csrf()
    await axios.post('/login', [email,password]);
```

Logout is as simple as loggin in:

```
    await axios.post('/logout');
```

Since CSRF vurnability there's a workaround for posting with `axios`:

```
import Axios from 'axios'

const axios = Axios.create({
    baseURL: process.env.NEXT_PUBLIC_BACKEND_URL,
    headers: {
        'X-Requested-With': 'XMLHttpRequest',
        'Accept': 'application/json'
    },
    withCredentials: true,
    withXSRFToken: true  //Workaround
})

export default axios
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

1525d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/63861757?v=4)[Andries Reitsma](/maintainers/andriesreitsma)[@andriesreitsma](https://github.com/andriesreitsma)

---

Top Contributors

[![andriesreitsma](https://avatars.githubusercontent.com/u/63861757?v=4)](https://github.com/andriesreitsma "andriesreitsma (6 commits)")

---

Tags

laravelauth

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/andriesreitsma-laravel-visa/health.svg)

```
[![Health](https://phpackages.com/badges/andriesreitsma-laravel-visa/health.svg)](https://phpackages.com/packages/andriesreitsma-laravel-visa)
```

###  Alternatives

[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

84611.1M64](/packages/php-open-source-saver-jwt-auth)[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5752.3M18](/packages/directorytree-ldaprecord-laravel)[jurager/teams

Laravel package to manage team functionality and operate with user permissions.

23822.5k](/packages/jurager-teams)[hasinhayder/tyro

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

6804.7k6](/packages/hasinhayder-tyro)[srlabs/centaur

An opinionated implementation of Cartalyst's Sentinel for Laravel 5

6058.3k](/packages/srlabs-centaur)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1563.2k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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