You should have a look at the following SO Q&A's , the solution is given here step by step :-
Yahoo authenticate & fetch profile details iOS
How to redirect from Yahoo to my IOS app after authentication?
Check the first answer of this forum by yahoo too :- Oath Yahoo Redirect Issue