Let us clearly understand the goal in this section. The Asana and GitHub OAuth app should be able to do the following.
- Know the current ticket that the user is viewing.
- A button interface that creates a task on the configured Asana board and an issue on the configured GitHub repository.
- Use OAuth as the authorization mechanism to make API requests to Asana and GitHub.
Approach
- We will use the Data Methods to get the context information from the current ticket details page that the user is viewing.
- Since the app creates a task in an Asana project board, Asana needs to trust the app and authenticate it. Therefore, We will use the OAuth 2.0 feature to authorize the user for the app.
- We repeat the same OAuth 2.0 authorization for GitHub.
- Finally, we will use the Request Method to make API calls with both Asana and GitHub to create issues and tasks respectively.