After enabling spatie/laravel-activitylog into various tenant models, tenancy has stopped working.
Subdomain now redirect to the central domain, and attempt to programmatically authenticating users results in redirect to login page.
Steps to reproduce
Create a working multi-tenant application
Add spatie/laravel-activitylog package via composer
Add LogsActivity trait and getActivitylogOptions method to various models in App\Models\Tenant namespace
Create a new tenant
Seed the database for new tenant
Programmatically add and authenticate tenant user to tenant database
Visit the tenant domain
At step#5 tenancy database will be seeded using database/seeders/DatabaseSeeder instead of database/seeders/tenant/DatabaseSeeder
At step#6 you'll be redirected to login page in browser
At step#7 you'll get redirected to central domain instead
Expected behavior
While the database is getting created alright, the domain app, as well as authentication and authorization functionality appears to have been broken. This may have to do with spatie/laravel-activitylog using auth()->user() to populate caused by.
Bug description
After enabling spatie/laravel-activitylog into various tenant models, tenancy has stopped working.
Subdomain now redirect to the central domain, and attempt to programmatically authenticating users results in redirect to login page.
Steps to reproduce
At step#5 tenancy database will be seeded using database/seeders/DatabaseSeeder instead of database/seeders/tenant/DatabaseSeeder At step#6 you'll be redirected to login page in browser At step#7 you'll get redirected to central domain instead
Expected behavior
While the database is getting created alright, the domain app, as well as authentication and authorization functionality appears to have been broken. This may have to do with spatie/laravel-activitylog using auth()->user() to populate caused by.
Laravel version
10.10
stancl/tenancy version
3.7