Mail verification
Hi everyone! đź‘‹
I’m working on a Filament app where I want to allow guest access to the panel (so I’ve removed the auth middleware). However, I also want to enable email verification using Filament’s built-in feature.
The problem is: as soon as I activate email verification, guests (unauthenticated users) are redirected to the verification prompt page, which obviously fails because they are not logged in — leading to errors.
Has anyone dealt with this before? Any ideas on how to:
• Keep guest access to the panel,
• Still use Filament’s email verification flow for users who do log in?
Thanks in advance! 🙏
3 Replies
Should just be a check in a middleware as to if the user is a guest or not and redirect appropriately, or have a bespoke “guest” account where you manually log them in via the middleware.
To be fair though, guest authorization to a panel doesn’t make sense to me.
Thanks for your input — it does make sense what you’re saying.
Just to give some context: I’m planning a kind of public database on a specific topic. The data should be accessible to everyone, so guest access is intentional and important. Even though Filament is technically an admin panel, its look and feel are actually perfect for this use case — clean, lightweight, and well-structured.
Also, since the Filament docs themselves mention ways to remove the auth middleware for guest access, I assumed this kind of use (even partially public) was at least somewhat supported or intended.
That’s why it was a bit surprising (and a bit discouraging) to hear that this might not make sense. I might need to rethink my setup now, but I’m still hoping there’s a clean solution.
As for the “guest” user approach — I don’t think it fits in my case. I still want real user accounts for people who contribute data to the platform, since the whole idea is to build a community-driven resource.
I actually did try a custom middleware already — but the problem is that Filament (or email verification) still forces redirection to the verification prompt. Ideally, I’d need a way to override or bypass that internal check for guests, while still enforcing it for logged-in users. Has anyone managed something like that?
Thanks again!
I don't think you can use Filaments built-in email verification as that relies on the users to store the information. You need to roll your own solution.