Download the PHP package inmanturbo/homework-starter-kit without Composer
On this page you can find all versions of the php package inmanturbo/homework-starter-kit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download inmanturbo/homework-starter-kit
More information about inmanturbo/homework-starter-kit
Files in inmanturbo/homework-starter-kit
Package homework-starter-kit
Short Description Self-hosted WorkOS-compatible OAuth server using Laravel Passport - starter kit.
License MIT
Informations about the package homework-starter-kit
WorkOS Passport Starter Kit
A ready-to-use Laravel application that provides a self-hosted, WorkOS-compatible OAuth server using Laravel Passport. This starter kit gives you a complete authentication server that can replace WorkOS while maintaining full API compatibility.
Features
- Drop-in WorkOS Replacement: Complete compatibility with WorkOS UserManagement API
- Laravel Passport Integration: Robust OAuth2 server implementation
- ULID User IDs: Uses Laravel's built-in ULID support for portable, sortable user identifiers
- String Client IDs: Full compatibility with WorkOS client applications
- Auto-Approval for First-Party Clients: Seamless user experience for your own apps
- JWT Token Support: WorkOS-compatible token format with JWKS endpoint
- Modern Laravel Architecture: Request-based routing with clean separation of concerns
- Ready to Deploy: Pre-configured Laravel application
Quick Start
Option 1: Using Laravel Herd (Easiest)
Option 2: Using Laravel Installer
Option 3: Manual Installation
Clone this repository and install dependencies:
2. Environment Setup
Configure your database in .env:
3. Database Setup
4. Create OAuth Client
Create a first-party client (auto-approves authorization):
Save the Client ID - you'll need this for your client applications.
5. Start the Server
Your WorkOS-compatible OAuth server is now running at http://localhost:8000!
API Endpoints
The starter kit provides these WorkOS-compatible endpoints:
GET /user_management/authorize- OAuth authorization endpointPOST /user_management/authenticate- Token exchange endpointPOST /user_management/authenticate_with_refresh_token- Refresh token endpointGET /user_management/users/{userId}- Get user informationGET /sso/jwks/{clientId}- JWKS endpoint for token verification
Client Application Setup
Laravel Applications with WorkOS SDK
Configure your client application to use your OAuth server:
Option 1: Configuration-Based (Recommended)
Add to your config/services.php:
In your .env:
In your AppServiceProvider:
Option 2: Environment-Based
Configuration
Passport Configuration
The starter kit comes pre-configured with sensible defaults in app/Providers/PassportServiceProvider.php:
User Model & ULID Support
The starter kit uses Laravel's built-in ULID support for user IDs, providing:
- Globally Unique: ULIDs are guaranteed to be unique across distributed systems
- Sortable: Lexicographically sortable by creation time
- URL-Safe: No special characters, perfect for APIs
- Portable: Work across different databases and systems
The User model includes the HasUlids trait:
User IDs will be ULIDs like: 01ARZ3NDEKTSV4RRFFQ69G5FAV
If you use a custom user model, ensure it includes the HasUlids trait and update config/auth.php:
Testing the Setup
Test your OAuth flow:
Deployment
Production Considerations
- Environment Variables: Set proper production values in
.env - Database: Use a production database (PostgreSQL, MySQL)
- HTTPS: Always use HTTPS in production
- Client Secrets: Keep OAuth client secrets secure
- Token Security: Consider shorter token lifetimes for production
Deployment Commands
Package Information
This starter kit uses the inmanturbo/homework package to provide WorkOS compatibility. The package:
- Modern Architecture: Request-based routing with type-hinted FormRequest classes
- WorkOS API Compatibility: Extends Laravel Passport with WorkOS-compatible endpoints
- Auto-Approval Middleware: Seamless first-party client authorization
- WorkOS Response Format: Returns snake_case formatted API responses
- JWT & JWKS Support: Token verification with public key endpoints
- ULID Compatible: Works seamlessly with ULID user identifiers
Migration from WorkOS
To migrate from WorkOS to this self-hosted solution:
- Deploy this starter kit to your server
- Create OAuth clients matching your WorkOS application IDs
- Update client applications to point to your OAuth server
- Test the authentication flow thoroughly
- Switch DNS/URLs when ready
Requirements
- PHP ^8.2
- Laravel ^12.0
- Laravel Passport ^13.0
- inmanturbo/homework ^0.0.2
- MySQL/PostgreSQL/SQLite
- Composer 2.x
- Node.js & NPM (for asset compilation)
Support
- Package Issues: inmanturbo/homework GitHub Issues
- Starter Kit Issues: homework-starter-kit GitHub Issues
License
MIT License. See LICENSE for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Self-hosted • Secure • WorkOS Compatible
All versions of homework-starter-kit with dependencies
inmanturbo/homework Version ^0.0.2
laravel/fortify Version ^1.30
laravel/framework Version ^12.0
laravel/passport Version ^13.0
laravel/tinker Version ^2.10.1
livewire/flux Version ^2.4
livewire/volt Version ^1.7