I'm using a custom languageBaseUrl for my Classic Universal Login page and upgrading to a newever Lock SDK version breaks the localization
Last Updated:
Overview
I'm using the Classic Login Experience with the Lock SDK. For localization, I use my own language dictionary files hosted on my own servers. The URLs looks like
https://<my-domain>/lock-files/js/lock/11.30.6/en.js
https://<my-domain>/lock-files/js/lock/11.30.6/de.js
https://<my-domain>/lock-files/js/lock/11.30.6/fr.js
and I have configured the languageBaseUrl like below.
var lock = new Auth0Lock(config.clientID, config.auth0Domain, {
// other configurations
languageBaseUrl: 'https://<my-domain>/lock-files',
});
After upgrading to a newer version of Lock SDK, the localization doesn't work anymore.
Symptoms
Localization of the classic login experience using Lock SDK doesn't work after upgrading to a latest version
In the browser developer tools, I see that requests to fetch the language dictionary files fail.
Applies To
- Classic Universal Login
- Localization
Cause
Solution
https://<languageBaseUrl>/js/lock/<lock-version>/<language>.jsIf you're using a languageBaseUrl of your own, ensure your directory structure reflects the value of your lock SDK version. If you upgrade your Classic Universal Login Page to a newer version, you must have your language dictionary files in a new folder under the version you're upgrading to.