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 today

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

1523d 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.1M63](/packages/php-open-source-saver-jwt-auth)[cartalyst/sentinel

PHP 8.2+ Fully-featured Authentication &amp; Authorization System

1.5k2.7M80](/packages/cartalyst-sentinel)[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5752.3M18](/packages/directorytree-ldaprecord-laravel)[auth0/login

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

2795.3M3](/packages/auth0-login)[jurager/teams

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

23822.5k](/packages/jurager-teams)[srlabs/centaur

An opinionated implementation of Cartalyst's Sentinel for Laravel 5

6058.3k](/packages/srlabs-centaur)

PHPackages © 2026

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