Is it possible to allow guests or unauthenticated users access to a panel...?
With v3, it seems that filament is less of an admin panel builder and is presented as a possible "customer-facing app...or anything you can imagine".
I would like to be able to use filament as a website or app that anyone can visit and have access to some resources without having to register or login. Then, of course, if they choose to register and login, they would be able to do/see a bit more.
I'd love to hear whether or not this is possible...using the v3 panel builder.
(I know one can use table/form builder and other filament "components" on "normal Laravel" routes, but this is not what I'm talking about.)
Thanks in advance for any help/input/answers. π€
8 Replies
I think removing the
Authenticate
middleware in your panel provider will get you most of the way there. Not sure if the Dashboard will work but I think custom pages and even resource pages should work.Thx. I had already removed it, but then the resources for that panel don't show up in the navigation and, when I manually enter the URL for one of the resources, I get a 403. (I have the related policies all returning
true
for everything.
I feel like I'm missing something.... π
Ah...I may have just found it....I bounced around the code and found
$shouldSkipAuthorization
...which then helped me to find this in the docs: https://filamentphp.com/docs/3.x/panels/resources/getting-started#skipping-authorizationNice find, I didn't know about it!
That, together with removing the authentication middleware, as you suggested, seems to do the trick.
Now, I've got to figure out how to get the login/register/profile stuff to work nicely. π€
Actually, I've got to figure out how to display login/register links (distinct from the rest of the resource nav links)...which is proving to be difficult. π
You are right that Filament is not just an admin panel. However, it was intended to work for authenticated customers, we don't have much interest in guests
@Travis Maybe this project can be useful to study : https://github.com/Hasnayeen/zorum
I think they are handling unauthenticated forum browsing by automatically logging in a Guest user.
GitHub
GitHub - Hasnayeen/zorum: A modern take on forum application
A modern take on forum application. Contribute to Hasnayeen/zorum development by creating an account on GitHub.
But in fact with the infolist builder module it is already one step away from being able to build the frontend too. Such a freature request π