-
Notifications
You must be signed in to change notification settings - Fork 364
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
Prevent nowProvider from being passed to authorize endpoint #840
Conversation
const assertUrlEquals = (actualUrl, host, path, queryParams) => { | ||
const url = new URL(actualUrl); | ||
expect(url.host).toEqual(host); | ||
expect(url.pathname).toEqual(path); | ||
for (let [key, value] of Object.entries(queryParams)) { | ||
expect(url.searchParams.get(key)).toEqual(value); | ||
} | ||
}; |
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.
This was duplicated from the one in helpers.ts
, so I removed it.
"noImplicitAny": false, | ||
"target": "es6" |
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.
es6
for testing so that I can get access to URLSearchParams.entries()
, shouldn't cause any problems with the SDK at runtime?
Regarding coverage, I've looked at it locally and the level of coverage hasn't changed from |
Changes
This PR prevents
nowProvider
from being passed through the URL when logging in. The fundamental change is thatnowProvider
is added to the destructure list inAuth0Client._getParams
.In addition, I've attemped to help prevent this in the future by adding a test that includes all the client options and verifying they're not in the URL. Adding this test flagged up a couple other properties that should have been excluded, so these have also been added.
Also did some refactoring in
_getParams
to tidy up the code a bit.References
Fixes #836
Testing
Checklist