-
Notifications
You must be signed in to change notification settings - Fork 229
fix: resolve circular dependency in Auth0Provider #1341
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
base: master
Are you sure you want to change the base?
fix: resolve circular dependency in Auth0Provider #1341
Conversation
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.
Pull Request Overview
This PR fixes a circular dependency issue in the Auth0Provider component by changing how the Auth0 client is created. The circular dependency was causing a "Cannot read property prototype of undefined" error in version 5.0.0-beta.4 and later.
- Replaces direct import of Auth0 class with Auth0ClientFactory import
- Changes client instantiation from
new Auth0(options)
to use factory pattern - Restructures the client object to expose only necessary properties
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
- Changed import from '../index' to '../factory/Auth0ClientFactory' - Use Auth0ClientFactory.createClient() instead of new Auth0() - Prevents 'Cannot read property prototype of undefined' error - Fixes issue occurring in v5.0.0-beta.4 and later Fixes auth0#1331 Co-authored-by: Alexandre Lage <[email protected]>
ea5eaa4
to
9d5c994
Compare
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.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…egration Co-authored-by: Alexandre Lage <[email protected]>
…in Auth0Provider Co-authored-by: Alexandre Lage <[email protected]>
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.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Alexandre Lage <[email protected]>
Co-authored-by: Alexandre Lage <[email protected]>
- Change from direct export functions to function declarations + export statement - Resolves 'snakeToCamel is not a function' runtime error - Ensures proper module loading in different environments
…ctions in conversion
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.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Changes
Fixes #1331
References
#1331
Testing
Checklist