AuthenticationClient is not a constructor in custom db login script

When executing the following code within a custom db login script, I get an error message AuthenticationClient is not a constructor:

const AuthenticationClient = require(‘auth0’).AuthenticationClient;
const auth0 = new AuthenticationClient({
domain: ‘mydomain.eu.auth0.com’,
clientId: configuration.ROPG_CLIENT_ID
});

Thanks in advance for any advise what’s wrong here.

Hi @elster,

It looks like you need to specify the version of the SDK here. i.e. require('auth@XXX')

The version you should specify will depend on which version of node you are using for your runtime.

You can check your node runtime setting tenant settings, then you can see which version are supported by each runtime here.

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