There is question Is it good to automatically sign up a user if he doesnt have an account?, but they focus on OAuth signin. They answer it is better because there is less friction, more convenient. Based on their answers, is that also true for email login?
In some other questions, people say combining sign in and sign up can cause confusion but their assumption is the signin and signup option is on the same page. But what I want to do is to also hide that complexity, such that the user do not even need to choose whether they want to sign in or sign up.
The "sign in" page will have 1) email field and 2) password field, then after submit, the server will determine whether account exists by checking if the email exists in the database.
If email exists, it successfully login.
If not, it will go to another page, where there will be 1) display name field 2) a note for user agreement 3) sign up button
I cannot think of any disadvantage of this flow. The database lookup is necessary for sign in anyway, so the drawback is trivial concerning server workload.
So, I wonder why does it seem no websites use this design? As I observe, websites such as Uber use two forms separately for email login and email registration. Even though Amazon combine that into one form, the user still need to choose whether they want to sign in or sign up.