Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK-1789] Add custom initial options to the 2 getToken methods #524

Merged
merged 2 commits into from
Jul 14, 2020

Conversation

adamjmcgrath
Copy link
Contributor

@adamjmcgrath adamjmcgrath commented Jul 13, 2020

Description

Custom auth params that are declared in the constructor should be passed to the token endpoint for the 2 get token methods (iframe and code exchange and refresh token)

References

fixes #514

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

@adamjmcgrath adamjmcgrath added small CH: Fixed PR is fixing a bug labels Jul 13, 2020
@adamjmcgrath adamjmcgrath added this to the vNext milestone Jul 13, 2020
@adamjmcgrath adamjmcgrath requested a review from a team July 13, 2020 11:50
@adamjmcgrath adamjmcgrath changed the title Add custom initial options to the 2 getToken methods [SDK-1789] Add custom initial options to the 2 getToken methods Jul 13, 2020
@@ -719,6 +747,7 @@ export default class Auth0Client {

const tokenResult = await oauthToken(
{
...this.customOptions,
...customOptions,
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it's worth renaming the local customOptions here, alongside this.customOptions, it could be confusing as to why they're both there. Or do you feel the reference to this is enough to differentiate them?

@adamjmcgrath adamjmcgrath merged commit c2f2c22 into master Jul 14, 2020
@adamjmcgrath adamjmcgrath deleted the default-custom-params branch July 14, 2020 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Fixed PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refresh token request doesn't include custom query parameters by default.
2 participants