PHPackages                             birdcar/authkit-laravel - 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. birdcar/authkit-laravel

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

birdcar/authkit-laravel
=======================

Laravel integration for WorkOS AuthKit

v0.2.0(1mo ago)00[7 PRs](https://github.com/birdcar/authkit-laravel/pulls)MITPHPPHP ^8.3CI passing

Since Jan 23Pushed 1w agoCompare

[ Source](https://github.com/birdcar/authkit-laravel)[ Packagist](https://packagist.org/packages/birdcar/authkit-laravel)[ RSS](/packages/birdcar-authkit-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (8)Used By (0)

AuthKit Laravel
===============

[](#authkit-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0519fb85af8b9c5067d0679de5e3dbc7812733c5f8fa1e6672e6fde912c8c1d7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626972646361722f617574686b69742d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/birdcar/authkit-laravel)[![PHP Version](https://camo.githubusercontent.com/7e1b43530cc6726b6b04648cc6ada33250be8d0b791db9f410784db0f2544536/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f626972646361722f617574686b69742d6c61726176656c3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/birdcar/authkit-laravel)[![Laravel Version](https://camo.githubusercontent.com/a168f1b1650d0978a5eafbdaec840617562969accde8b4d0a4a5250491a2e56d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31312e7825323025374325323031322e782d626c75653f7374796c653d666c61742d737175617265)](https://packagist.org/packages/birdcar/authkit-laravel)[![License](https://camo.githubusercontent.com/5d77a5c9dcf91c0625c64f762fc524615e66dc9ad8057d2dee2e62cdcb2c3e74/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626972646361722f617574686b69742d6c61726176656c3f7374796c653d666c61742d737175617265)](LICENSE)

Drop-in [WorkOS AuthKit](https://workos.com/docs/authkit) integration for Laravel. Guards, middleware, Blade directives, Livewire widgets, webhook sync, and an interactive install wizard -- everything wired up so you can go from `composer require` to working authentication in about 15 minutes.

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

[](#installation)

```
composer require birdcar/authkit-laravel
```

Run the install wizard:

```
php artisan workos:install
```

Add your [WorkOS Dashboard](https://dashboard.workos.com) credentials to `.env`:

```
WORKOS_API_KEY=sk_live_...
WORKOS_CLIENT_ID=client_...
WORKOS_REDIRECT_URI=https://your-app.test/auth/callback
```

The package auto-registers its service provider and `WorkOS` facade via Laravel's package discovery. See [Installation](docs/usage/installation.md) for migration guides, custom guard names, and publishing config.

Quick start
-----------

[](#quick-start)

The package registers a `workos` auth guard and sets up `/auth/login`, `/auth/callback`, and `/auth/logout` routes automatically:

```
// routes/web.php
Route::middleware('workos.auth')->group(function () {
    Route::get('/dashboard', fn () => view('dashboard'));
});
```

Check roles and permissions in routes or Blade:

```
Route::middleware(['workos.auth', 'workos.role:admin'])->group(/* ... */);
Route::middleware(['workos.auth', 'workos.permission:posts:write'])->group(/* ... */);
```

```
@workosRole('admin')
    Admin Panel
@endworkosRole

@workosPermission('posts:write')
    New Post
@endworkosPermission
```

See [Authentication](docs/usage/authentication.md) and [Authorization](docs/usage/authorization.md) for the full API.

Testing
-------

[](#testing)

```
use WorkOS\AuthKit\Facades\WorkOS;

it('requires admin role', function () {
    $user = User::factory()->create();

    WorkOS::actingAs($user, roles: ['admin']);
    $this->get('/admin')->assertOk();

    WorkOS::actingAs($user, roles: ['member']);
    $this->get('/admin')->assertForbidden();
});
```

See [Testing](docs/usage/testing.md) for `WorkOS::fake()`, builder methods, audit assertions, and the `InteractsWithWorkOS` trait.

Documentation
-------------

[](#documentation)

- [Installation](docs/usage/installation.md) -- Setup, migration from existing auth, publishing config
- [Authentication](docs/usage/authentication.md) -- Guard, sessions, login/callback/logout, impersonation
- [Authorization](docs/usage/authorization.md) -- Roles, permissions, FGA, feature flags, middleware, Blade directives
- [Organizations](docs/usage/organizations.md) -- Multi-org, switching, invitations, domain verification
- [Events &amp; Webhooks](docs/usage/events.md) -- Event routing, Events API polling worker
- [Webhooks](docs/usage/webhooks.md) -- Real-time webhook ingestion, event handling, sync listeners
- [Widgets](docs/usage/widgets.md) -- Livewire components for user management, admin portal, etc.
- [Testing](docs/usage/testing.md) -- `WorkOS::fake()`, `actingAs()`, assertions
- [Audit Logging](docs/usage/audit-logging.md) -- WorkOS Audit Logs integration
- [Commands](docs/usage/commands.md) -- Artisan command reference
- [Configuration](docs/usage/configuration.md) -- Complete config reference

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 11 or 12
- WorkOS PHP SDK ^5.0
- Livewire ^4.0 (optional, for widget components only)

License
-------

[](#license)

MIT. See [LICENSE](LICENSE) for details.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance96

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.5% 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 ~74 days

Total

2

Last Release

31d ago

PHP version history (2 changes)v0.1.0PHP ^8.2

v0.2.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ae7d6c0d0d79964baa8983329873cf76933ddec22faee5e1a4bcf3dd4efb7ea?d=identicon)[birdcar](/maintainers/birdcar)

---

Top Contributors

[![birdcar](https://avatars.githubusercontent.com/u/434063?v=4)](https://github.com/birdcar "birdcar (196 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

laravelAuthenticationSSOworkosauthkit

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/birdcar-authkit-laravel/health.svg)

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

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

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

JSON Web Token Authentication for Laravel and Lumen

8359.8M52](/packages/php-open-source-saver-jwt-auth)[andrewdwallo/filament-companies

A comprehensive Laravel authentication and authorization system designed for Filament, focusing on multi-tenant company management.

34450.0k2](/packages/andrewdwallo-filament-companies)[workos/workos-php-laravel

WorkOS PHP Library for Laravel

341.8M](/packages/workos-workos-php-laravel)[alajusticia/laravel-logins

Session management in Laravel apps, user notifications on new access, support for multiple separate remember tokens, IP geolocation, User-Agent parser

2011.0k](/packages/alajusticia-laravel-logins)

PHPackages © 2026

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