The OAuth Login and Approve has the wrong URL when using IIS as a proxy
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
The content on this page relates to platforms which are not supported. Consequently, Atlassian Support cannot guarantee providing any support for it. Please be aware that this material is provided for your information only and using it is done so at your own risk.
The OAuth dance (Login and Approve) can redirect to the wrong URL. Some examples this has been reported:
- In Jira's Development panel, when authenticating with Development Tools
- When inserting Jira issue macros into Confluence
- When working with third party tools that utilize OAuth and Application links
Check the URLs that are producing errors. Key factors that can help you determine if you're running into this problem or not:
Does the context path match the destination URL?
For example, if you're linking a Confluence site at <mysite.com/wiki> to a Jira site at someothersite.com/jira, does Jira show
/wiki in the URL (and produce a page not found)?
Does the Application Link ID in the URL match the destination application?
Check the application link ID in the URL of the malfunctioning URL - it should be different to the ID from the destination; which can be checked by browsing to
<yoursite.com/rest/applinks/2.0/manifest.json> as an administrator.
Are you using IIS as your reverse proxy with Application Request Routing (ARR)?
This document only applies to IIS when ARR is in use.
This is caused by the "Reverse rewrite host in response headers" option being enabled in IIS.
This setting can be enabled at the site level, where it will affect only that site - but it can also be enabled at the machine level. Make sure to check both the site level configuration and the machine level configuration in IIS Manager.
Disable the setting "Reverse rewrite host in response headers"