Given that OAuth URLs for Live and O365 are different** (hope I'm right about that one in the first place), is there a way to know form a Office Task Pane add-in whether the current user is running with a Live ID or an Office 365 ID?
We currently resort to showing two buttons for the user to login: One for "Login with Windows Live" and another for "Login with Office 365" which initiate the respective OAuth steps. We want to make it so that there's only one login button and it would be preset for the type of user currently logged in.
You will want to take a look at the Azure AD converged auth. Here's the article that discusses the various approaches https://azure.microsoft.com/en-us/documentation/articles/active-directory-appmodel-v2-overview/
And here's a blog post that talks about the same: https://blogs.msdn.microsoft.com/richard_dizeregas_blog/2015/09/04/working-with-the-converged-azure-ad-v2-app-model/
The converged auth supports implict grant which is ideal for the task pane Add-in
Also we're building an auth helper to help you achieve the same within the task pane with ease. I'll edit my response when it goes public.
Edit:
You can now use OfficeHelpers to easily authenticate with Microsoft, Google, Facebook or any 3rd Party OAuth Provider.
Here's the library: https://unpkg.com/@microsoft/office-js-helpers@0.5.0/dist/office.helpers.js
Here's the documentation: https://github.com/OfficeDev/office-js-helpers
Please file an issue https://github.com/OfficeDev/office-js-helpers/issues if you have any problems/find a bug.