Implementing an OAUTH sign-in flow in Office add-ins can be problematic. Indeed, this thematic is subject to frequent questions on stackoverflow (see this one for example ).
When developing Keluro - Smart Email Sharing which is both an Office 365 web-app and an Outlook add-in, we needed a solution where these two applications share the same sign-in/authentication mechanism for a better user experience.
We worked in order to propose an email archiving software that takes benefit from the new features released by the Microsoft Office Extension team and implements the proper fallbacks when the Office host do not support them. We decided to release an open source sample to help the community building such Office 365 authenticated add-in and web apps. We hope also to benefit from feedbacks from the Office 365 dev community to enhance this sample.
The code source and documentation is available on Github.