Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using dev-kit outside of Forge by decoupling @forge/bridge and @finesoftware/forge-jira-api #24

Open
gablabelle opened this issue Jul 10, 2022 · 0 comments

Comments

@gablabelle
Copy link

gablabelle commented Jul 10, 2022

Hello!

Not really an issue, more of a discussion starter. 馃槃 I recently watched your talk on YouTube.

It would be nice if we could also use this outside of Forge. For example, I'm building a SaaS app that will also connect to JIRA and this repo seems to contain everything I need to simplify this process, thanks to you guys.

And, at first glance, from what I understand from the code, is that your react hooks and the underlying methods used to make the API calls to communicate with the Atlassian servers, use the @forge/bridge package from which it imports a requestJira method which is basically just a wrapper around fetch, probably to manage request headers, tokens, etc.

If we could decouple @forge/bridge and @finesoftware/forge-jira-api and simply use a composition pattern that allows to pass requestJira OR our own "custom" fetch to, for example, a Provider instead, or to a factory function used for configuration, it would make it possible to use this dev kit outside of Forge.

My next.js app (running next-auth) would acquire an access_token via an Oauth flow and simply attach that access_token to every fetch requests sent to the JIRA servers.

Is this something you guys would be open to?

Screen Shot 2022-07-09 at 19 56 49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant