PipedreamHQ / PipedreamHQ/pipedream
[BUG] Submit an app UI is unable to extract the access token from a header in the response
- 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. However, we've found already two instances where the authorization token is returned in a header. 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 from a response header.
**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 [Tableau](https://pipedream.com/submit-an-app/tableau?tab=auth-strategy) (already submitted, available for PD admin)
OR use information for SugarSync app: https://www.sugarsync.com/dev/api/method/create-refresh-token.html
(SugarSync returns the token info in the Location header)
**Expected behavior**
The submit an app UI should be able to extract the authorization token from response headers, such as from the Location header returned by SugarSync
**Screenshots**
If applicable, add screenshots to help explain your problem.
1. Example of response headers from SugarSync:

2. SugarSync API specification, mentioning response headers contain the authorization token:

**Desktop (please complete the following information):**
- Windows 10
- Edge
- 119.0.2151.44 (Compilación oficial) (64 bits)
**Additional context**
All the following applications are blocked on this issue
SugarSync (user request)
https://github.com/PipedreamHQ/pipedream/issues/8777
Tableau (user request)
https://github.com/PipedreamHQ/pipedream/issues/4873
the mroy wants to build Tableau based components themselves.
Casting42
https://github.com/PipedreamHQ/pipedream/issues/8913
there is a workflow showing the test request with session flow for Tableau: https://pipedream.com/@sergio/w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-tableau-session-auth-flow-p_gYCpKV9/inspect
which could be helpful for tweaking the app current tableau submitted
Contributor guide
Assessment
This issue has not been assessed yet.