Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Languages not available on cdn.eu.auth0.com #576

Closed
cgcote opened this issue Aug 19, 2016 · 3 comments
Closed

Languages not available on cdn.eu.auth0.com #576

cgcote opened this issue Aug 19, 2016 · 3 comments
Assignees
Labels
bug This points to a verified bug in the code
Milestone

Comments

@cgcote
Copy link

cgcote commented Aug 19, 2016

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 !

@strindhaug
Copy link
Contributor

strindhaug commented Aug 19, 2016

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.

@hzalaz
Copy link
Member

hzalaz commented Aug 19, 2016

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>

@hzalaz hzalaz added bug This points to a verified bug in the code v10 labels Aug 19, 2016
@gnandretta
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

5 participants