You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I've been working on an integration with Asana and realized that there is no internal helper function for Oauth2-based authentication like there was on the first major version of the node client.
That's correct. The new version of our node library does not have an internal helper function for OAuth-2 based authentication. We have had some issues with this internal helper function in the past with some of our other libraries so we didn't implement it for the new client library versions. Developers can use an external OAuth 2.0 library like passport-oauth2 to help them implement OAuth 2.0 for their app server. Or they could use a request library like axios and implement OAuth through there like you are. That being said, I'll take a note of this and bring this up with our team to see if we can add this feature back into a future update of our node library.
As for your issue with OAuth. I think you might want to catch the error from axios to access the error Asana is throwing back in the response. For example instead of:
Hi! I've been working on an integration with Asana and realized that there is no internal helper function for Oauth2-based authentication like there was on the first major version of the node client.
When I try to use the Oauth2 endpoints documented here https://developers.asana.com/docs/oauth#pkce-oauth-extension I always get a 400 with no useful error message.
Here's my auth code:
This is what the response looks like:
Am I missing something obvious here?
The text was updated successfully, but these errors were encountered: