# Can't connect an app to Asana

**URL:** <https://forum.asana.com/t/cant-connect-an-app-to-asana/818292>\
**Category:** API & Developers\
**Created:** [29 May 2024 10:35 UTC](https://forum.asana.com/t/cant-connect-an-app-to-asana/818292 "2024-05-29T10:35:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ignacio\_Santiago\_Alb](https://luna1.co/8d76cd.png) [@Ignacio\_Santiago\_Alb](https://forum.asana.com/u/Ignacio_Santiago_Alb)\
**Post date:** [29 May 2024 10:35 UTC](https://forum.asana.com/t/cant-connect-an-app-to-asana/818292/1 "2024-05-29T10:35:41Z")

</div>

Hi everyone,

I’m trying to add an app I created that makes use of components to a project, so I need to set up OAuth in order to authorize the app.

The thing is, I implemented the whole OAuth flow and it seems to work correctly on my server, but on Asana it keeps waiting for authorization and never connects.

![image](https://us1.discourse-cdn.com/asana/original/3X/3/d/3dfeeeca9d893717f6aacf8a48ee7ab2dd7f88ee.png)

I set up the custom authentication URL and, as I said, everything seems to be fine. I also can get the token correctly using the code that I receive on the authentication endpoint.

Following the docs, I’m returning an HTML in response to the authorization request including the following script:

```auto
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <title>You have successfully connected Asana to the app</title>
    </head>
    <body>
        Success!
        <script>
          window.opener.postMessage("success", "https://app.asana.com");
          window.close();
        </script>
    </body>
</html>

```

in order to respond with “success” on the same window that the authorization request opens.

However, as you can see on the image above, the app doesn’t connect with Asana.

Inspecting the network flow I noticed that it seems Asana is reporting an exception after I return the HTML. On the console appears the following:

```auto
POST https://app.asana.com/app/asana/-/report_client_exception?session...

```

Any idea about why can’t I connect the app to Asana? Maybe I’m overlooking something?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Bastien\_Siebman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/bastien_siebman/32/172354_2.png) [@Bastien\_Siebman](https://forum.asana.com/u/Bastien_Siebman)\
**Post date:** [29 May 2024 19:00 UTC](https://forum.asana.com/t/cant-connect-an-app-to-asana/818292/2 "2024-05-29T19:00:48Z")

</div>

I realised if I test in the desktop app or in the browser, it doesn’t behave the same way. One work and the other doesn’t… can you try both?

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 18:59 UTC](https://forum.asana.com/t/cant-connect-an-app-to-asana/818292/3 "2025-05-30T18:59:24Z")

</div>

Closed on 30 May 2025 18:59 UTC


