I added Jira OAuth to my webapp following docs at https://developer.atlassian.com/server/jira/platform/oauth/ . I used sample code they provided in that article. Here is how it is working now:
1. Use will click `Login with Jira` button on webapp.
2. Backend will generate a token and open a new tab with URL something like `https://jira.company.com/plugins/servlet/oauth/authorize?oauth_token=ec3dj4byySM5ek3XW7gl7f4oc99obAlo`.
3. Above link will take user to Jira for authorization. When user click `Approve`. He will be given a verification code like 'qTJkPi'. He will submit this back to webapp.
4. Backend will exchange token (step-2) and verification code (step-3) with jira for a `Access Token`.
Here user has to copy the verification code manually and submit to webapp. Can we make Jira automatically redirect user to Webapp after authentication along with verification code?