Bitbucket OAuth fails from a Forge UIKit app

See below. Is this a known issue? I’m guessing it gets confused when it redirects back to id.atlassian.com.

Has anyone gotten this to work or Is there a better way to integrate to bitbucket from UIKit?