# CORS Issues fetching the token in edge-case node

**URL:** <https://forum.asana.com/t/cors-issues-fetching-the-token-in-edge-case-node/288007>\
**Category:** API & Developers\
**Created:** [23 December 2022 09:11 UTC](https://forum.asana.com/t/cors-issues-fetching-the-token-in-edge-case-node/288007 "2022-12-23T09:11:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlo](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/carlo/32/38703_2.png) [@Carlo](https://forum.asana.com/u/Carlo)\
**Post date:** [23 December 2022 09:11 UTC](https://forum.asana.com/t/cors-issues-fetching-the-token-in-edge-case-node/288007/1 "2022-12-23T09:11:20Z")

</div>

Hello Everyone,

I am working on a plugin for Obsidian (obsidian.md). Obsidian is an Electron app, so I can use node and be happy with it.

So far I have been able to create a new Electron Browser window, log in to Asana and get the code, but when I call

```auto
client.useOauth();
client.app.accessTokenFromCode(code);

```

Then I get a CORS error. In the error I can see that the origin of the call is `app://obsidian.md` which does not match my return url.

 ![Screenshot 2022-12-23 at 10.09.02](https://us1.discourse-cdn.com/asana/original/3X/7/1/714eed3fc699f8f6802511d0c812cca2e5b9fa43.jpeg)

Is there any suggestions you have on how to use the Asana node library from a third-party app and avoid the CORS issues? I am not doing the POST request by myself, but using the provided function.

Thanks  
Carlo

---

<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 19:03 UTC](https://forum.asana.com/t/cors-issues-fetching-the-token-in-edge-case-node/288007/2 "2025-05-30T19:03:04Z")

</div>


