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

Improve the provide function in order to allow passing a factory function #663

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LcsGa
Copy link

@LcsGa LcsGa commented Nov 26, 2024

Description

In some cases, we could need to use some other providers in order to configure auth0.
In this regard, I added the possibility to also provide a factory function and not just a basic value to allow this.

provideAuth0(() => {
    const someProvider = inject(SomeProvider);
    return {
        ...
        /* we can now use someProvider here */
    }
});

This improvement doesn't include any breaking change.

Testing

There is no existing unit tests for this provide function.

You can manually test it by playing with the playground, using this provide function and passing a factory function instead of an object.

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

@LcsGa LcsGa requested a review from a team as a code owner November 26, 2024 11:06
@LcsGa LcsGa force-pushed the feat/provide-fn-factory branch from b722a39 to 06382a6 Compare November 26, 2024 11:07
@LcsGa
Copy link
Author

LcsGa commented Nov 26, 2024

About the Example.md formatting changes, it seems that there is a git hook behind but I can't find it...
I guess that the new formatting isn't wanted, right?

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.

2 participants