© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
1 reply
AgonK

Customizing filament login behavior

I'm having a problem customizing the login behavior in filament

I have a SaaS API project with multiple databases. On the login request I get the credentials and find the user database and reconnect to the respective database and on the next request I get the database from token and reconnect again and everything works fine in my API branch.

Now, I am using filament for admin panel, and for using this structure I have created new login class and extend
\Filament\Pages\Auth\Login
\Filament\Pages\Auth\Login
and modify
authenticate()
authenticate()
method
What I did here is, get the credential, find the appropriate database for this client and pass the default database to the corresponding database and add a new field to the session database name data.

On the other hand, I create a middleware for the next request when the session is isset and the database name exists, reconnect this database and continue. This middleware is in my
AdminPannelProvider
AdminPannelProvider
in
authMiddleware
authMiddleware
method. But this structure does not work as I expected.

What I'm missing here. Do you have any ideas?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Customizing login page
FilamentFFilament / ❓┊help
3y ago
Customizing relation manager create behavior
FilamentFFilament / ❓┊help
2y ago
Customizing Filament Export Action
FilamentFFilament / ❓┊help
2y ago
filament login
FilamentFFilament / ❓┊help
2y ago