Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
We've introduced a regression where calling
new Auth0Client({ ... })
will fail in an SSR environment because it relies onsessionStorage
stevehobbsdev@937025c#diff-7edf092a689fc6f24b10820757119ce4L24 (see where the check for window undefined has been removed)Unfortunately our ssr tests which are designed to catch this, didn't pick this up because we stub
sessionStorage
in all environments. I've only noticed it because the auth0-react tests don't stub it https://app.circleci.com/pipelines/github/auth0/auth0-react/251/workflows/0cc79dde-40bd-4b7e-852d-eee41fbd50dc/jobs/263Our 'check all the frameworks' tests didn't catch it because we only check importing the class, not instantiating it https://gist.github.com/adamjmcgrath/ff26be1795aeb1689e657c7fbc885021#file-run-sh-L6
I'll need to release a patch for this before I publish auth0-react