I have created a Jira plugin and deployed it on one Jira instance (A). I want to achieve that a user can authorize the plugin to access data of another Jira instance (B) via the OAuth flow. For instance, the plugin redirects the user to instance B, the user grants access and then instance B would redirect the user to the client (i.e. the Jira plugin of instance A) with the access code.
Is this possible? In OAuth you have a callback URL to which the user is redirected after granting access (i.e. the redirect received from instance B). What would this callback URL be for the plugin?