We have implemented some pre-registration hook during our registration flow. That hook calls our API to check whether the account can be registered (on basis of email domain). Then deny or allow access.
Why that hook does not work when I try to register using SSO but it works when email & password are passed manually? Is it desired behaviour or is it a bug?
Behind the scenes, Hooks and Actions are functionally the same. They offer you a way to manipulate the authentication flow.
When using Actions, the following Triggers will not work with SSO:
Pre-User Registration
Post-User Registration
Post-Change Password
Send Phone Message
The only Trigger that will work with SSO is the Login Action. Note that the Machine-to-Machine Action is irrelevant to user authentication.
In general, using Hooks/Actions with connections varies according to the extensibility points. Hooks and Actions only work with Database and Passwordless Connections.
Please let me know if there is anything else I can do to help. I would be glad to assist.