ronasit / laravel-clerk
Package provides auth guard to auth user via the Clerk
Installs: 3 606
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 0
Open Issues: 0
pkg:composer/ronasit/laravel-clerk
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
This package is auto-updated.
Last update: 2025-10-20 04:13:14 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
installcommand
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); } }