Lock: Languages not available on cdn.eu.auth0.com

Created on 19 Aug 2016  路  3Comments  路  Source: auth0/lock

Hi,

Specifying a language with an european account will make the auth lock try to load

https://cdn.eu.auth0.com/js/lock/10.2.1/{{language}}.js

which returns a 403.

I guess Auth0 tries to fetch assets on the eu CDN because I specify veyocare.eu.auth0.com as my clientDomain (my account is linked to this domain and I cannot change it).

Either I am doing something wrong, files are missing or the eu client should point to cdn.auth0.com

Thanks !

bug v10

Most helpful comment

Until we fix this, you can try the following workaround to load the language

<script src="https://cdn.auth0.com/js/lock/{version}/lock.min.js"></script>
<script src="https://cdn.auth0.com/js/lock/{version}/{language}.js"></script>

All 3 comments

I have the same issue....

The script should probably try the master cdn if the local one fails, and default to english if the language cannot be found.

Being able to log in is a bit more important than the language on the login form... If the user doesn't speak English at all to the extent that they are unable to login using an English form; then they are probably not helped much by a message telling them in English that "Something went wrong"...
But really, if a user have ever logged in before, they would probably understand how to login even if the language is one they don't understand.

Until we fix this, you can try the following workaround to load the language

<script src="https://cdn.auth0.com/js/lock/{version}/lock.min.js"></script>
<script src="https://cdn.auth0.com/js/lock/{version}/{language}.js"></script>

We should replace the assetsUrl option with clientBaseUrl and languageBaseUrl:

  • The client will be fetched from ${clientBaseUrl}/${clientID}.js and will default to the CDN url including the region (e.g. https://cdn.eu.auth0.com/client). The region is inferred from the domain.
  • The language will be fetched from ${languageBaseUrl}/${lang}.js and will default to the CDN without the region (e.g. https://cdn.auth0.com/js/lock/${lockVersion}/).
  • The new options have priority over assetsUrl.
  • If assetsUrl is provided, keep the current behavior: fetch client from ${assetsUrl}/client/${clientID}.js and languages from {assetsUrl}/js/lock/${lockVersion}/${language}.js.
Was this page helpful?
0 / 5 - 0 ratings