Skip to content

Use the POST token endpoint when retrieving an access token.#31

Open
richardwarlden wants to merge 1 commit intodevelopfrom
PRO-1815/get-access-token-with-post
Open

Use the POST token endpoint when retrieving an access token.#31
richardwarlden wants to merge 1 commit intodevelopfrom
PRO-1815/get-access-token-with-post

Conversation

@richardwarlden
Copy link

PRO-1815 - Change method for refresh_token flow in File selector

The following issues are addressed:

  • All api calls are ensured to have a valid accesstoken.

  • Calls to endpoint, https://accounts.mediaflow.com/oauth2/token, passes client_id, client_secret and refresh_token as payload in the body instead of using querystring parameters.

  • For api calls, the access token are always passed with the Authorization header, instead of using querystring parameters

body.append("client_secret", client_secret);
body.append("refresh_token", refresh_token);

xhr.open('POST', 'https://accounts.mediaflow.com/oauth2/token');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded URL. Make it configurable to .tech and .build as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants