Is it possible to have a pre-login hook as we have for post-login or pre-registration?
Our goal is to run a code before auth0’s login happens.
The issue is that we want to migrate users from an existing system to auth0, without specifying the other operations like create a user or change a password.
So if it’s not possible with a custom DB connection, then we would like to do the same with a script.
A similar thing is possible through AWS Cognito, where we can run pre-login hooks.
Unfortunately we only have post-user registration hook and pre-user registration one. I would advocate for that by using our [Feedback category] and filing in a feature request. Thank you!
We also could use this. Our need is we want the login user to enter their email address (identifier first login), then we intercept (auth0 action) that request, look up the user in our database and redirect them to the correct company SSO. The reason we have to do it this way is we have companies that have lots of clients with different email addresses that go through their SSO.
Second this. We want a local/global account with a single linked idp. This is to normalize all users. In this case we want to force the use of the linked idp for a given email domain. I.e alice@corp.com MUST login with Corp.com SSO. Bob@whatever.com can login in all ways Local or linked.
Another way to look at it is if I see a Corp.com email it’s just a lookup to use the Corp.com company sso.
As this topic is related to Rules - Hooks - Actions and Rules & Hooks are being deprecated soon I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!
We would also like this feature. Our need would be to strip special characters from an email address, which we are using as the username for other applications.