F
Filament2mo ago
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 and modify 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 in authMiddleware method. But this structure does not work as I expected. What I'm missing here. Do you have any ideas?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server