Note: This guide works for all S3-compatible storage services like Minio, Digital Ocean Spaces, etc.
- Passport Documentation: https://laravel.com/docs/10.x/passport#main-content
- S3 Documentation: https://laravel.com/docs/10.x/filesystem#driver-prerequisites
Laravel Passport needs encryption keys to generate access tokens. But, by default, these encryption keys are Git ignored to avoid accidentally exposing it to the internet. When it comes to production environment, we can't just generate these encryption keys every time we deploy since that will result to access tokens not working suddenly.