ronasit / laravel-clerk
Package provides auth guard to auth user via the Clerk
Installs: 1 883
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 1
Open Issues: 2
Requires
- php: ^8.3
- laravel/framework: >=11.34
- lcobucci/jwt: ^5.5
- winter/laravel-config-writer: ^1.2
Requires (Dev)
- ext-openssl: *
- orchestra/testbench: ^10.4
- php-coveralls/php-coveralls: ^0.1.0
- phpunit/phpunit: ^12.2
- ronasit/laravel-helpers: ^3.5
- dev-main
- 1.1
- 1.0
- 0.0.3-beta
- 0.0.2-beta
- 0.0.1-beta
- dev-implement-install-command
- dev-create-install-command
- dev-change-config-description-accordingly-to-the-Clerk-UI
- dev-DenTray-patch-1
- dev-rguskov/update-laravel-version
- dev-7-create-gitattributes-file
- dev-disable-exceptions
- dev-fix-exception-for-use-invalid-token-structure
- dev-1-init-package
This package is auto-updated.
Last update: 2025-08-20 03:46:18 UTC
README
Laravel Clerk Guard
Introduction
This package offers an authentication guard to seamlessly integrate Clerk authentication into your Laravel project.
Installation
- Use Composer to install the package:
composer require ronasit/laravel-clerk
- Run package's
install
command
php artisan laravel-clerk:install
- Populate the necessary configuration options in
config/clerk.php
.
Usage
By default, your app returns the User
class with just the external_id
property, which holds the user's ID in Clerk.
To customize this behavior, you'll need to create your own UserRepository
that implements the UserRepositoryContract
.
Then, rebind it in one of the service providers:
use RonasIT\Clerk\Contracts\ClerkUserRepositoryContract; use App\Support\Clerk\MyAwesomeUserRepository; class AppServiceProvider extends ServiceProvider { public function boot(): void { $this->app->bind(ClerkUserRepositoryContract::class, MyAwesomeUserRepository::class); } }