I have an add-on for Jive, based on the Jive SDK for Node JS, that interacts with a third-party application, Atlassian Confluence. It provides several tiles that allow a user to see data that has been fetched from Confluence, and also tiles that allow the user to interact with Confluence for searches, adding pages, blog posting, and so on. Now we are building a !app that will bring some of those features into the Jive editing context. What I want to know is: how can our Node JS components (which support the tiles) share OAuth credentials (either access tokens, or maybe client id/client secret) so that the user who installs the add-on only goes through the OAuth dance once?
Currently, each of our tiles have configuration UIs that take the user through the OAuth dance with Confluence. It's managed by our Node JS components via the OAuth2Client functions provided by the Jive SDK. So our Node JS application receives an OAuth access token, with which it accesses Confluence on behalf of a user. At the moment, the client id and client secret for accessing Confluence via OAuth is embedded in the jiveclientconfiguration.json file; we're in the process of removing it so that our Node JS application can operate as a multi-tenant solution (read on).
We want our Node JS application to provide a 'Cloud' solution. Customers will acquire our add-on via the Marketplace or whatever, and configure it for interaction with their particular Confluence instance. In other words our Node JS application needs to be multi-tenant. One thought: we can provide a configuration dialog (using the config_url property) to let the user enter OAuth credentials upon installation of our add-on.
I've read about Jive Connects, and I think I understand the concept of App Services, and the ability for !apps to declare their dependency on a particular App Service. Could our Node JS components tap into App Services? How do you see tiles and !apps sharing configuration? Should our !app be interacting with Confluence via our Node JS components? Can we avoid the user having to go through the OAuth dance once for the App Service and again for the tiles?
Thanks for any advice or information that you may be able to provide.