joelbutcher / socialstream

OAuth for Laravel, simplified.
https://docs.socialstream.dev
MIT License
433 stars 66 forks source link

Socialstream Features missing from socialstream config after mixed jetstream/filament install #345

Closed jonphipps closed 8 months ago

jonphipps commented 8 months ago

Stack

Filament Admin Panel

Package Version

v6.0.1

Laravel Version

v11..0.7

Livewire Version

v3.4.9

react Version

No response

Vue Version

No response

PHP Version

php 8.3.3

Problem description

when I follow the instructions here: https://docs.socialstream.dev/guides/filament-with-jetstream, the config/socialstream.php file is missing the 'features', 'home', and 'redirects' keys and these are replaced with 'component' => 'socialstream::components.socialstream'

And the 'connected_accounts' table migration was repeated.

I of course may have done something wrong.

Expected behavior

I guess I expected those keys to be there or to have it documented that they aren't needed.

Steps to reproduce

just follow the steps here: https://docs.socialstream.dev/guides/filament-with-jetstream

Reproduction repository

https://github.com/jonphipps/socialstream-demo

Relevant log output

No response

joelbutcher commented 8 months ago

Yeh the filament install will overwrite the config published by the Jetstream install, since the we don't have the same features for Filament as we do for Jetstream or Breeze.

Can you try republishing the config via php artisan vendor:publish and searching for socialstream-config?

jonphipps commented 8 months ago

At the moment this seems to be the best workflow...

  1. Laravel new {project} (No starter kit option)
  2. cd {project}
  3. composer require filament/filament
  4. php artisan filament:install --panels (install in admin)
  5. composer require joelbutcher/socialstream
  6. php artisan socialstream:install jetstream
  7. php artisan migrate
  8. delete config/socialstream.php
  9. republish config/socialstream.php
  10. insert 'component' => 'socialstream::components.socialstream', above the 'features' key
  11. make the required changes to app/Models/User

This avoids duplicating the socialstream migrations (from two socialstream installs) and everything works as expected. The only time you see the Filament login is if you hit the admin path unauthenticated, which appropriately doesn't offer a register option, but also doesn't offer a provider login option. I haven't fiddled with it enough to know if this is a problem -- I'm not customizing either login.

I just want to say that this is an excellent and helpful package. I have no idea if my use case of jetstream+teams with filament is worth pursuing or if I should just use socialstream to install filament and dive headfirst into filament multi-tenancy, hoping there's no big rocks hidden in the water.

joelbutcher commented 8 months ago

The install forces migrations, which is why it duplicates in multiple installs, I can remove this though, I don't think that would be too much of an issue.

The way I tested it when building was to install for filament, then delete the migrations and published config file then install for Jetstream and required features.