I'm creating an online service that requires users to sign in with their email address, and before they can sign in on a new device, they have to confirm it with an email message in their inbox. The important part of this is that you have to verify the email address for the device you are using before you can check if the password is correct.
I'm considering the requirement of verifying the email before being able to type the password, but this doesn't seem like good UX. If I allow them to type the password, then hit Sign In and require them to send the email, if they typed the wrong password it will show that after they verify the email and they'd have to type it again after they were appeared to have signed in.
What's the best way to accomplish this on the sign in page?