This is a common issue with Yahoo Mail accounts in Apple Mail caused by Yahoo's OAuth (token-based) authentication. When the token expires or is revoked, Apple Mail shows a password prompt but the dialog can be broken. Here's how to fix it:
1. Remove and re-add the Yahoo account:
- Open System Settings (or System Preferences) > Internet Accounts
- Select your Yahoo account and click the minus (−) button to remove it
- Click the plus (+) button, select Yahoo, and sign in again
- This forces a fresh OAuth login and generates a new token
2. If step 1 doesn't work, try signing out of Yahoo in your browser first:
- Go to yahoo.com, sign out, then sign back in to verify your Yahoo credentials are working
- Then re-add the account in Internet Accounts as above
3. Check for App-Specific Password requirements:
- Yahoo may require an app-specific password if you have two-step verification enabled
- Sign in at login.yahoo.com > Account Security > Generate App Password
- Use that app-specific password when adding the Yahoo account in macOS
4. If Mail still doesn’t connect after re-adding:
- Open Mail > Preferences (or Settings) > Accounts
- Select Yahoo > click “Re-enter password” or ensure the account is enabled
- Restart Mail after making any changes
The iPhone connecting fine but not the Mac is typical of an expired or mismatched OAuth token specifically on macOS — removing and re-adding the account almost always resolves this.