Skip to content

Conversation

AlexandreLage
Copy link

Changes

  • 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 #1331

References

#1331

Testing

  • This change adds unit test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

@Copilot Copilot AI review requested due to automatic review settings October 9, 2025 19:49
@AlexandreLage AlexandreLage requested a review from a team as a code owner October 9, 2025 19:49
Copy link

@Copilot Copilot AI left a 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]>
@AlexandreLage AlexandreLage force-pushed the fix/circular-dependency-auth0provider branch from ea5eaa4 to 9d5c994 Compare October 9, 2025 19:54
@AlexandreLage AlexandreLage requested a review from Copilot October 9, 2025 19:56
Copy link

@Copilot Copilot AI left a 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.

@AlexandreLage AlexandreLage requested a review from Copilot October 10, 2025 19:45
Copy link

@Copilot Copilot AI left a 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.

alex-at-sagelabs and others added 5 commits October 10, 2025 16:48
- 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
@AlexandreLage AlexandreLage requested a review from Copilot October 11, 2025 00:56
Copy link

@Copilot Copilot AI left a 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.

@AlexandreLage AlexandreLage requested a review from Copilot October 11, 2025 01:48
Copy link

@Copilot Copilot AI left a 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.

Copy link

@Copilot Copilot AI left a 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.

@AlexandreLage AlexandreLage requested a review from Copilot October 13, 2025 15:33
Copy link

@Copilot Copilot AI left a 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.

@AlexandreLage AlexandreLage requested a review from Copilot October 13, 2025 15:41
Copy link

@Copilot Copilot AI left a 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.

@alex-at-sagelabs
Copy link

@mlc @evansims @bigtiger anybody who could review this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TypeError: Cannot read property 'prototype' of undefined]

2 participants