PipedreamHQ / PipedreamHQ/pipedream

[BUG] Submit an app UI is unable to extract the access token when the access token is the entire payload of the body.

Open
#9,732 1 comment 0 reactions 0 assignees View on GitHub
bug tracked internally triaged
Dominant language
JavaScript
Stars
11.7k
Forks
5.8k
Avg merge
3d 10h
Merged PRs (30d)
102

Description

**Describe the bug**
The submit an app ui contains three options in the authorization strategy tab. None, API Keys, and OAuth.
The OAuth option on its own handles different strategies requiring multi steps, where an authorization token is generated in intermediate steps, and used in a final step of a test request calling the target API.

The bug in question relates to a scenario where an authorization flow is setup via the OAuth option. This scenario usually falls into the authentication flow commonly referred to as Session Auth, or Basic+Bearer. In general, most applications using the Session Auth flow will return the authorization token in the response body, in an structured manner. However, we've found an instance where the authorization token is returned in body, with the token being the entire content of the payload. In this case, application can't be tested with the existing Submit an App UI implementation because there is no way yet to instruct it to extract the authorization token if it's the entire response payload, as the submit an app ui expects key/value pairs to do the extraction.

**To Reproduce**
Steps to reproduce the behavior:
Fill the submit an app UI with data from an application using Session Auth and returning the authorization token in response headers.
You can look for [Skkrible](https://pipedream.com/submit-an-app/skribble?tab=auth-strategy) (already submitted, available for PD admin)

**Expected behavior**
The submit an app UI should be able to extract the authorization token from the response body, even if the token is the entire response body content (and not only structured via key-value pairs)

**Screenshots**
If applicable, add screenshots to help explain your problem.

Example of response body from Skkrible:
![image](https://github.com/PipedreamHQ/pipedream/assets/101526248/b3f36f59-8a77-41d5-aa6d-9523b072126d)

**Desktop (please complete the following information):**
Windows 10
Edge
120.0.2210.121 (Compilación oficial) (64 bits)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.