Use API authentication in Filament
Hi, I have a project with an API (sanctum tokens) and a panel in Filament. I would like to login with the API and continue the session in Filament.
Front consuming API and Filament panel are in the same domain, different subdomains.
What could be the best approach to do that? Thansk
3 Replies
You might be able to change the authGuard from web to sanctum, see https://filamentphp.com/docs/3.x/panels/users#setting-the-authentication-guard
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
The subdomains might be tricky though, personally i'd get it working first before looking at subdomains as it can be a lot of trial and error with wildcard cookie settings