F
Filamentβ€’14mo ago
Travis

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
Patrick Boivin
Patrick Boivinβ€’14mo ago
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.
Travis
TravisOPβ€’14mo ago
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....
Travis
TravisOPβ€’14mo ago
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-authorization
Patrick Boivin
Patrick Boivinβ€’14mo ago
Nice find, I didn't know about it!
Travis
TravisOPβ€’14mo ago
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. πŸ˜’
Dan Harrin
Dan Harrinβ€’14mo ago
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
Patrick Boivin
Patrick Boivinβ€’14mo ago
@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.
qcol
qcolβ€’10mo ago
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 πŸ˜‰
Want results from more Discord servers?
Add your server