Is it possible to have a panel that is public without authentication?
Currently if I remove auth middleware the Filament\FilamentManager::getUserAvatarUrl() can't find an auth user so throws an error.
Don't know if it's worth trying to make this work or not?
8 Replies
You can create a guest user and auto log it in
Haha, good idea. thank you
Mind you, makes it a little more complicated when we get to the point of needing to do registration or login - both of which are already public pages. Maybe it's cleaner to use those page layouts instead.
@Dennis Koch Public Auth pages use the simple layout. Any reason why I can't use the same layout for my public panels?
You could but there won't be any navigation
I don't get why people want to use the same panel for guests
I need a bunch of guest pages but logging in a guest user doesn't feel right for a few reasons.
presumably though I could copy the simple layout, add the navigation and then it would work
presumably though I could copy the simple layout, add the navigation and then it would work
That doesn't answer my question. Why make everything the same for guests?
Usually such pages have completely different layout. And if you need some forms or whatever there just add them as a livewire component using filament
I don't understand your question. Why make everything the same for guests? a consistent UI for the user and I just want to reuse an existing layout. What's wrong with that. keep it DRY.
Maybe you misunderstand. I have a new panel called frontend -> I just want to have pages that work without authentication. I'm new to filament and trying to figure it out. Seems like I need to create a new layout file to do this.
You have to create a new layout file because the Filament pages have views in them that depend on a user being logged in, like the user avatar for example. So trying to use those layouts without a logged in user would break the app and most likely cause 500 errors.
Damn, came here in the hopes I could do a public panel. Would be awesome to have this in the future though