I want all my users to go through passwordless only. except for few, that can use regular password authentication. But I am getting either username-password, If I have it connection enabled, and I have to disable it for passwordless. Anyway to allow users with passwords to go through username-password, and everyone else, who don’t have passwords at all to go through passwordless route?
Hi @tenesripranav,
Welcome to the Auth0 Community!
Your desired scenario can be implemented using custom logic within your application by checking the email entered by the user or look up their preference ( to send them either to a passwordless or username-password authentication. An instance that I can think of where this could be achieved would be setting the Identifier First Authentication, then call the Management’s API GET /v2/users-by-email endpoint and check if the identities array contains a database connection or check the app_metadata for a custom flag you’ve set (like created_password: true).
Then construct your /authorize call accordingly using the connection parameter, as mentioned in this community post - Use both Passwordless and Password in Universal Login as well, or append it directly to a login method that corresponds to your SDK in use, such as loginwithRedirect().
Another option that you might be interested in could be the Flexible Connection Switching feature which enables an implementation that allows users to select their preferred authentication method (database credentials or a one-time password via email or SMS) directly within the Universal Login experience.
I hope this helps, and if you have further questions please let me know.
Thank you!
Best regards,
Remus