F
Filamentβ€’2mo ago
shabxs

Call Model on afterValidate

How could I trigger a modal on a afterValidate() hook of User Registration. I would like to do this for OTP Verification
6 Replies
shabxs
shabxsOPβ€’2mo ago
Thanks @toeknee I could dispatch the modal. But it just pops up and continue with the rest of the process How do I stop it there and only proceed after action on the modal. Perhaps its a basic php question ... πŸ™‚
toeknee
toekneeβ€’2mo ago
you wouild usually return false somewhere, Although I've decided a better approach is on confirmation of login, use the session to require 2fa and on successful 2fa you allow access, else you need to enter a 2fa code to handle any request. Therefore you can use a middleware to ensure they are 2fa confirmed at all times.
shabxs
shabxsOPβ€’2mo ago
2fa is a little too much for my application... Here I would like to just verify the user is registering with a valid and active phone number..
toeknee
toekneeβ€’2mo ago
So why not just extend the original login page and add a validation method to be not unique? You would just need an additional TextInput with a validation method?
shabxs
shabxsOPβ€’2mo ago
will try .. Thanks for the quick support
Want results from more Discord servers?
Add your server