Node-auth0: safe to use singleton ManagementClient?

In auth0-node, used in an express web-server, is it safe to make a single ManagementClient (Non Interactive Client ), and then keep that around in a global variable, or should we be creating a new ManagementClient object for each request?
Thanks.

Hi @ken2,

Welcome to the Auth0 Community!

Yes, it is safe to initialize a single ManagementClient class object to call different methods. That should not be a problem and is encouraged.

Please let me know if you need further clarification or have any questions.

Thanks!

Thank you for the answer!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.