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-1924] client methods should handle partially filled arguments #561

Merged
merged 2 commits into from
Aug 27, 2020

Conversation

adamjmcgrath
Copy link
Contributor

@adamjmcgrath adamjmcgrath commented Aug 26, 2020

Description

getUser, getIdTokenClaims and getTokenWithPopup relies on a default object argument for it's defaults, this can be an issue when passing a partially filled or empty object argument eg getUser({}). This will not use the default object so not apply the default arguments.

References

See #554

Testing

Login to the SPA JS playground
call await auth0.getUser({})

Expected: an object containing your user data
Actual: undefined

  • 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 requested a review from a team August 26, 2020 14:55
@adamjmcgrath adamjmcgrath added CH: Fixed PR is fixing a bug small labels Aug 26, 2020
@adamjmcgrath adamjmcgrath merged commit b8fbfec into master Aug 27, 2020
@adamjmcgrath adamjmcgrath deleted the default-args branch August 27, 2020 09:48
@adamjmcgrath adamjmcgrath added this to the v1.12.0 milestone Sep 4, 2020
@adamjmcgrath adamjmcgrath mentioned this pull request Sep 4, 2020
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.

2 participants