Yahoo! two-step authentication with iOS Mail and Apple Mail I have recently activated two-step authentication for my Yahoo! e-mail account. I am now no longer able to use iOS Mail (on iPhone) or Apple Mail (on macOS) even though I have created third-party app passwords as recommended by Yahoo!.

The error messages read "Invalid Password. Please try again." (in Settings | Mail | Accounts | ...@yahoo.com | Re-enter Password) and "Wrong Password. Try again." for iOS Mail and Apple Mail respectively.

So how can I successfully configure Yahoo! third-party app passwords into iOS Mail and Apple Mail?
When you sign in with third party apps into Yahoo Account, the password you have to give is not the account password that you use , instead you have to use a key which is provided by yahoo for that particular third party application.

ie, in Yahoo Account Security Settings you have to generate a key for each application which you use to login the Yahoo Account. Next time during login to Yahoo Account through application you have to give this key in place of your password.
More details in Yahoo Account Security Setting https://help.yahoo.com/kb/SLN15241.html
Hope this helps