Skip to content
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

Refactor the provideAuth0 function to return an EnvironmentProviders instead of Provider[] #664

Open
5 tasks done
LcsGa opened this issue Nov 26, 2024 · 1 comment
Open
5 tasks done
Labels
feature request A feature has been asked for or suggested by the community

Comments

@LcsGa
Copy link

LcsGa commented Nov 26, 2024

Checklist

  • I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved

In the EXAMPLES.md it is stated that

provideAuth0 should never be provided to components, but only at the root level of your application.
Currently, nothing is preventing you to avoid it.

Describe the ideal solution

I propose to update the current code to using makeEnvironmentProviders (that has been created especially for this kind of requirements):

provideAuth0(config?: ...) {
    return makeEnvironmentProviders([...]);
}

Alternatives and current workarounds

No response

Additional context

No response

@LcsGa LcsGa added the feature request A feature has been asked for or suggested by the community label Nov 26, 2024
@LcsGa
Copy link
Author

LcsGa commented Nov 26, 2024

About breaking changes: There is a possibility of including a breaking change if some people didn't take the note you've written into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature has been asked for or suggested by the community
Projects
None yet
Development

No branches or pull requests

1 participant