node-asana | Official nodejs and browser JS client for the Asana API v1 | REST library

 by   Asana JavaScript Version: v1.0.2 License: MIT

kandi X-RAY | node-asana Summary

kandi X-RAY | node-asana Summary

node-asana is a JavaScript library typically used in Web Services, REST, Nodejs applications. node-asana has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can install using 'npm i asana-fork' or download it from GitHub, npm.

A JavaScript client (for both Node and browser) for the Asana API v1.0.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              node-asana has a low active ecosystem.
              It has 245 star(s) with 71 fork(s). There are 227 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 41 open issues and 68 have been closed. On average issues are closed in 191 days. There are 15 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of node-asana is v1.0.2

            kandi-Quality Quality

              node-asana has 0 bugs and 0 code smells.

            kandi-Security Security

              node-asana has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              node-asana code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              node-asana is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              node-asana releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions are not available. Examples and code snippets are available.
              node-asana saves you 43 person hours of effort in developing the same functionality from scratch.
              It has 114 lines of code, 0 functions and 126 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed node-asana and discovered the below as its top functions. This is intended to give you an instant insight into node-asana implemented functionality, and help decide if they suit your requirements.
            • Creates a new Client .
            • bump version in bower . json
            • Creates a new Dispatcher .
            • Handle the request
            • Update version file
            • Specification functions .
            • Bundles the Asana asana . js
            • Auto - detecting the type of environment .
            • Fetch results of pages from a collection of pages
            • Create a new resource stream from the collection .
            Get all kandi verified functions for this library.

            node-asana Key Features

            No Key Features are available at this moment for node-asana.

            node-asana Examples and Code Snippets

            No Code Snippets are available at this moment for node-asana.

            Community Discussions

            QUESTION

            How to use Omniauth Asana with Rails API only app
            Asked 2017-May-31 at 23:17

            I have a Rails 5 API only app and an Angular JS Frontend app and would like to integrate with Asana API. I'm using the ruby-asana, omniauth and omniauth-asana gems.

            I start the request using Asana's JS library like so:

            ...

            ANSWER

            Answered 2017-May-31 at 23:17

            OK, I think I see what you're attempting to do here; I think the best way forward is to start with how OAuth's Authorization Code Grant happens in general, then move into specifics for OmniAuth.

            • You send the user to a URL that Asana owns; that is, your goal is to get the user to visit a particular url. For Asana, this is https://app.asana.com/-/oauth_authorize. (Note that we respond with an error if you don't sent a correct client_id param, but feel free to check that link if you want). Do not send the client_secret during this request - it is intended to never be involved in client-side code, as this is insecure.

            • If they agree to give access, Asana sends back a redirect request to the user's browser with a short-lived code. That then means that your server will be called from the user's browser with this code as a parameter, so has to handle a new incoming request from the browser to whatever you specified as your redirect URI. Also, this location must be accessible by all users of your integration wherever they are.

            • You send this code from your server as a POST request to https://app.asana.com/-/oauth_token with your client_secret to Asana for a refresh token. This is where your application actually asks for credentials; the token given in the previous phases simply acknowledges that for a short time, the user has given your app permission to ask for these credentials, and your client_secret assures Asana that, for this server-side request, your app really is yours (it's like your application's password).

            • We send back an access_token which represents (approximately) a client-user credential pair that is valid for an hour. You use these credentials to access our API on behalf of this user. We also send back a refresh_token which is long-lived, and used to get new short-lived access_tokens after they expire in a very similar way.

            OK, so how this works with OmniAuth if I grok it correctly is that it expects to handle almost all of it. I'll be working through our omniauth example in our ruby-asana client library here: https://github.com/Asana/ruby-asana/blob/master/examples/omniauth_integration.rb

            1. You set up OmniAuth with your client id and client secret

            Source https://stackoverflow.com/questions/44280518

            QUESTION

            Asana API Personal Access Token return 401 (Unauthorized)
            Asked 2017-Feb-01 at 19:19

            When we are accessing Asana API we are using the Asana node client v0.15.0 together with an Tampermonkey script. The Api is responding with an 401 (Unauthorized).

            This worked a couple a days ago. I have tried with new Personal Access Tokens but still get the same error. While fiddling the request I tried to change the auth-header Bearer to be lower cased.

            Authorization: Bearer my-personal-access-token -> Authorization: bearer my-personal-access-token.

            This seems to work fine, that indicates that something changed on Asana's side.

            The node-asana js client lib does not let me modify the request before sending it to Asana API.

            According to Asana API support it is on stackoverflow that I should ask about help on this matter.

            EDIT

            By some further investigation it seems that when we send in the cookie auth_token=My auth token we do get the 401 error. But If removing the cookie and reissue the request in fiddler it works fine.

            Another note is that now we do not get any custom_fields in the response from e.g https://app.asana.com/api/1.0/tasks/TaskId

            ...

            ANSWER

            Answered 2017-Feb-01 at 19:19

            I'm a Developer Advocate at Asana. You've caught something that is a known issue and we're working on a fix :) We're rolling out a new version of our API. It's intended to be backwards-compatible with the older implementation, but giving us multiple forms of authentication is one of those cases where we do something different between the two.

            For security purposes, we initially implemented this in the new version to not allow requests with multiple forms of authentication, but it turns out that in-browser integrations were affected in precisely the way you're seeing: being logged into Asana, which causes your browser to send your authorization credentials for requests to asana.com automatically, and also authorizing "the right way" for our API with OAuth or a Personal Access Token will end up breaking. We're working on a fix that will allow this to work for the case when both the logged in (cookie) user and the API (access token) user are the same.

            If this is an urgent issue and you want to force the old behavior to happen while we roll out the fix in our newer API implementation, you can set a header as described in that link --^ to force your requests on to the old API. Once we get the new API fully deployed and stable, though, we'll deprecate that header, so please be cautious in relying on it for a long-term solution.

            Sorry that this has caused issues for you, and thanks for creating this question to let us know!

            Source https://stackoverflow.com/questions/41869186

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install node-asana

            You can install using 'npm i asana-fork' or download it from GitHub, npm.

            Support

            The code is thoroughly documented with JSDoc tags. The [Official Asana Documentation][asana-doc] is a great resource, since this is just a thin wrapper for the API.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/Asana/node-asana.git

          • CLI

            gh repo clone Asana/node-asana

          • sshUrl

            git@github.com:Asana/node-asana.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link