The term inside the languageDictionary is not reflecting

Hello, I am new to Auth0.
I am trying to change the signUpTerms based on the instruction here, GDPR: Track Consent with Lock

However, when I update the content of the signUpTerms, it does not reflect on the Preview tab or my development signup.

Based on the topic here, I am aware that the New Universal Login is not supported Terms of service acceptance on signup, however, it is the same when I switch to the classic Universal Login as well.

May I know what’s the issue here?

Hi @ayden,

Welcome to the Auth0 Community, it’s great that you’ve joined us :slight_smile:

I tried this out with the default Lock template and I did the below:

  • On line 31 there is a languageDictionary definition, I extended it to include my custom text as below:
languageDictionary = { 
        title: config.dict.signin.title, 
        signUpTerms: "This is my custom text <a href='https://my-app-url.com/terms' target='_blank'>terms of service</a> and <a href='https://my-app-url.com/privacy' target='_blank'>privacy policy</a>." 
      };
  • As part of the var lock = new Auth0Lock(config.clientID, config.auth0Domain, {... definition I added the below:
        showTerms: true,
    	mustAcceptTerms: true,

To be honest I think you might just have showTerms: true missing but the above is what I tested and this worked.

I hope you can get this working.
All the best.

Thank you Saqid Hussain.

I think the instruction shown at GDPR: Track Consent with Lock is quite misleading.

We should replace the languageDictionary at line 31 instead of inside the Auth0Lock.

The working code should be like this.

if (config.dict && config.dict.signin && config.dict.signin.title) {
  languageDictionary = { 
    title: config.dict.signin.title, 
    signUpTerms: "This is my custom text <a href='https://my-app-url.com/terms' target='_blank'>terms of service</a> and <a href='https://my-app-url.com/privacy' target='_blank'>privacy policy</a>." 
  };
} else if (typeof config.dict === 'string') {
  language = config.dict;
}

// Available Lock configuration options: https://auth0.com/docs/libraries/lock/v11/configuration
var lock = new Auth0Lock(config.clientID, config.auth0Domain, {
  ...
  mustAcceptTerms: true,
  showTerms: true,
  ...
});

Hi @ayden,

I agree that the documentation doesn’t appear to be a working implementation. I will submit this to the docs team to have this updated so other users do not have the same issue.

Have a great rest of your day.
Warm regards.