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

Support custom parameters in RefreshToken call #385

Closed
cpave3 opened this issue Jun 25, 2021 · 3 comments · Fixed by #395
Closed

Support custom parameters in RefreshToken call #385

cpave3 opened this issue Jun 25, 2021 · 3 comments · Fixed by #395
Labels
feature request A feature has been asked for or suggested by the community waiting for customer This issue is waiting for a response from the issue or PR author

Comments

@cpave3
Copy link

cpave3 commented Jun 25, 2021

Describe the problem you'd like to have solved

We have a need to provide custom parameters to both the authorize and refreshToken calls so that we can use rules to add some derived data into our JWTs. authorize currently supports this by just adding the extra parameters to the call, but the refreshToken call seems to filter them out.

Describe the ideal solution

Ideally, I can submit a PR to either add an extra argument to the refresh token call to allow custom parameters, or skip the argument and just make that the default behaviour if it won't break anything. The main thing here is that I'd like to check if this is an acceptable solution that would be likely to get merged in. If so, I am happy to make the change.

Alternatives and current work-arounds

If we make the call manually, with the custom parameters included in the POST body, it works as desired

@cpave3 cpave3 added the feature request A feature has been asked for or suggested by the community label Jun 25, 2021
@lbalmaceda
Copy link
Contributor

@cpave3 Thanks for raising this and for checking first, it's a valid request. I think you could achieve that similarly to how it's done in the authorizeUrl method, using this property .

Happy to review a PR once you have it 👍

@lbalmaceda lbalmaceda added the waiting for customer This issue is waiting for a response from the issue or PR author label Jun 28, 2021
cpave3 pushed a commit to cpave3/react-native-auth0 that referenced this issue Jul 23, 2021
@cpave3
Copy link
Author

cpave3 commented Jul 26, 2021

@lbalmaceda I've made the change and submitted the PR. Please let me know if you need anything else from my side 🙏 Thank you.

lbalmaceda added a commit that referenced this issue Aug 2, 2021
Disable whitelist on auth refreshToken call (#385)
@lbalmaceda lbalmaceda linked a pull request Aug 2, 2021 that will close this issue
5 tasks
@lbalmaceda
Copy link
Contributor

Merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature has been asked for or suggested by the community waiting for customer This issue is waiting for a response from the issue or PR author
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants