-
Notifications
You must be signed in to change notification settings - Fork 214
fix: add missing options for renewTokens method #405
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
Conversation
joshcanhelp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bkotrys - We appreciate the very detailed report and concise PR here! I'm happy to merge this in but we probably want to re-think the documentation provided (see comment). We're gearing up for the last (planned) release for this major and happy to get this PR in before that goes out.
src/Auth0.php
Outdated
| * - options.grant_type Grant type to use; required. | ||
| * - options.client_id Application Client ID; required. | ||
| * - options.client_secret Application Client Secret; required if token endpoint requires authentication. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would definitely leave these out since the first must be refresh_token (and is added automatically) and the others are added automatically with whatever the Auth0 object was initiated with. The audience is ignored in the refresh case (that info is part of the refresh token record). And, in the case of scope, that's ignored in most cases as well (not yours, of course).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joshcanhelp updated, please let me know if this satisfied you.
|
joshcanhelp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bkotrys - Thank you for the update here! I added a test for the custom options so I think this is good to go. We'll get this released today or tomorrow 👍
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Changes
This PR adds possibility to provide additional options to
renewTokensmethod. This options (especiallyscopeoption) are necessary in situation when we add custom scope tocontext.accessTokenand would like to renew tokens. Without providing proper scope (openid) after callingrenewTokensmethod we got following error:Token did not refresh correctly. Access or ID token not provided.Example rule - add custom scope to accessToken
References
Relates to:
May be somehow related to these issues:
**
Testing
This change adds test coverage
This change has been tested on the latest version of PHP
Checklist
I have read the Auth0 general contribution guidelines.
I have read the Auth0 Code of Conduct.
All existing and new tests complete without errors.
The correct base branch is being used.