1 Reply Latest reply on Sep 30, 2014 5:18 AM by nilsheuer

    How can tiles and !apps share configuration data?


      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.

        • Re: How can tiles and !apps share configuration data?

          Hi David!


          You do not need Jive connects for this.


          When you combine your tiles and your app within the same you can uniquely identify users. across both functionalities.

          The configuration pages for tiles are actually very similar to Jive app views (they are so called synthetic views) so any method you use within your time is also available in an app view.


          We store OAuth credentials with the user record in our backend. As every signed request coming from Jive includes the user id, this allows you to use the same credentials in a tile configuration and in an app.