I have an external Laravel app I want to sync with my Flarum forum. For example, if they login on the forum, they are automatically logged in and I can display their username, email, etc... (Also ideally want it so if the username changes on Flarum, it will also be reflected when they access the external pages as well.)
I've seen a few people recommend Passport, but it seems a bit overly complicated for my use-case and I'm really not a fan of the whole redirect and asking for approval part since I feel in my use-case it's more likely to just confuse my users and add more friction than necessary.
I thought about just defining a new connection with my flarum details, and configuring the User class in my external Laravel app using something like;
protected $connection = 'flarum';
protected $table = 'flarum.users';
public $timestamps = false;
This has the added benefit that I could easily add relationships in my external app to the user as well, and while I'm sure it'll work, it feels a bit hacky and I'm sure it will have some weird quirks.
I was wondering what my other options were in regards to achieving this or if there was an officially endorsed way to achieve this sort of functionality.