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

Missing otp parameter in tokenParams #1152

Closed
psamim opened this issue Jan 24, 2021 · 0 comments · Fixed by #1153 or #1155
Closed

Missing otp parameter in tokenParams #1152

psamim opened this issue Jan 24, 2021 · 0 comments · Fixed by #1153 or #1155
Labels
bug report This issue reports a suspect bug or issue with the SDK itself

Comments

@psamim
Copy link
Contributor

psamim commented Jan 24, 2021

Describe the problem

According to the documentation at https://auth0.com/docs/api/authentication?http#authenticate-user the /oauth/token end-point accepts otp parameter. But this parameter is missing in the white-list in https://github.com/auth0/auth0.js/blob/master/src/helper/parameters-whitelist.js#L8 . So the oauthToken cannot white-list the otp parameter and removes it in https://github.com/auth0/auth0.js/blob/master/src/authentication/index.js#L397 .

What was the expected behavior?

To include the otp param and have it white-listed.

Reproduction

outh0.oauthToken({ username, otp, realm, grantType, audience });

Will result in error:

missing required parameter otp

Environment

Latest version from master branch

@psamim psamim added the bug report This issue reports a suspect bug or issue with the SDK itself label Jan 24, 2021
psamim added a commit to psamim/auth0.js that referenced this issue Jan 24, 2021
@psamim psamim mentioned this issue Jan 24, 2021
3 tasks
stevehobbsdev pushed a commit that referenced this issue Jan 26, 2021
@stevehobbsdev stevehobbsdev linked a pull request Jan 26, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report This issue reports a suspect bug or issue with the SDK itself
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant