You can setup a two step verification on your account. This will send a text message with a code to your mobile device, that you'll need to enter in order to login.
Sign in to your Yahoo Account info page.
Click Account security.
Under "Two-step verification," click the On/Off icon.
Enter your mobile number.
To enable two-step verification, you’ll need to verify your mobile number. Click Send SMS to receive a text message with an Account Key, or Call me to receive a phone call with your code.
Enter the verification code, click Verify.