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

feat: allow to pass a method as token #793

Merged
merged 3 commits into from
Mar 15, 2023

Conversation

KillianHmyd
Copy link
Contributor

Changes

This allow to have custom management of the token. For example when scaling an application horizontally we might want to share the tokens between all the application instances.
This allow to do so with the following :

const auth0ManagementClient = new ManagementClient({
  token: () => Promise.resolve('my-token')
  clientId,
  domain,
  audience,
  scope,
});

References

Following this issue : #792

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds unit test coverage
  • This change adds integration test coverage

Checklist

@KillianHmyd KillianHmyd requested a review from a team as a code owner March 14, 2023 11:45
Copy link
Contributor

@adamjmcgrath adamjmcgrath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @KillianHmyd

src/management/index.js Outdated Show resolved Hide resolved
src/management/index.js Outdated Show resolved Hide resolved
src/management/index.js Show resolved Hide resolved
src/management/index.js Outdated Show resolved Hide resolved
Copy link
Contributor

@adamjmcgrath adamjmcgrath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - thanks @KillianHmyd!

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