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 1mo ago

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 32% of packages

Maintenance29

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

1471d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9f237fb6cae3ef28bd5f3029de91860e5df167962ad5f13a045d7aa5cab1fb0f?d=identicon)[andriesreitsma](/maintainers/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

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[codegreencreative/laravel-samlidp

Make your PHP Laravel application an Identification Provider using SAML 2.0. This package allows you to implement your own Identification Provider (idP) using the SAML 2.0 standard to be used with supporting SAML 2.0 Service Providers (SP).

263763.5k1](/packages/codegreencreative-laravel-samlidp)[corbosman/laravel-passport-claims

Add claims to Laravel Passport JWT Tokens

88655.9k](/packages/corbosman-laravel-passport-claims)[jurager/teams

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

22817.3k](/packages/jurager-teams)[codebot/entrust

This package provides a flexible way to add Role-based Permissions to Laravel

1596.6k](/packages/codebot-entrust)

PHPackages © 2026

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