I am working on a web portal that integrates with Yahoo Mail and some other third parties. The application can be used on desktop and mobile devices and we use OAuth to handle authentication between us and Yahoo.
The OAuth process involves directing the user to https://api.login.yahoo.com/oauth/v2/request_auth from where Yahoo automatically redirects the user to their login page for them to enter their credentials before returning back to our application.
The problem we are experiencing is that Yahoo do not seem to take into account the User Agent of the browser when they redirect the user to the Yahoo login page. This means that on mobile devices, the user ends up on the desktop login page which does not provide a good user experience.
Other third parties who provide OAuth services (e.g. Google and Facebook) recognise that the user is on a mobile device and redirect to the appropriate login page. In fact, Yahoo also does this if you do a straightforward login (try https://mail.yahoo.com from both a desktop and mobile device) but it doesn't work with OAuth for some reason.
Does anyone know how to get this to work?
Note that some similar questions have been asked before with no solution: