You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using a custom Auth0 domain that is configured in Auth0.plist. However when showing embedded Lock login screen we get this errors:
DEBUG | ClassicRouter.swift:42 - No connections configured. Loading client info from Auth0...
INFO | CDNLoaderInteractor.swift:37 - Loading client info from client/{clientId}.js -- https://our.custom.domain
VERBOSE | CDNLoaderInteractor.swift:68 - Received jsonp alert("You should not be hitting this endpoint. Make sure to use the code snippets shown in the tutorial or contact [email protected] for help");
ERROR | CDNLoaderInteractor.swift:112 - Failed to parse alert("You should not be hitting this endpoint. Make sure to use the code snippets shown in the tutorial or contact [email protected] for help" with error Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set." UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}
Fatal error: Your Auth0 credentials ClientId and/or Domain are invalid.: file Pods/Lock/Lock/ConnectionLoadingPresenter.swift, line 44
The issue seems to be that configuration is tried to be downloaded from https://our.custom.domain/client/{clientId}.js
instead of from https://cdn.auth0.com/client/{clientId}.js
Note: The CDN URL varies by region. For regions outside of the US, use https://cdn.[eu|au].auth0.com (eu for Europe or au for Australia).
Looking at the source code I did not find a way how to set a custom configuration URL. For our purpose I have modified the source code of CDNLoaderInteractor.swift and changed a line in private function cdnURL(from:)
This issue seems to be similar to this one auth0/lock#1311 where the problem was missing configurationBaseUrl parameter. However it was in a different library (JavaScript version of Lock, not iOS/Swift version).
We are using a custom Auth0 domain that is configured in Auth0.plist. However when showing embedded Lock login screen we get this errors:
The issue seems to be that configuration is tried to be downloaded from
https://our.custom.domain/client/{clientId}.js
instead of from
https://cdn.auth0.com/client/{clientId}.js
Note: The CDN URL varies by region. For regions outside of the US, use
https://cdn.[eu|au].auth0.com
(eu for Europe or au for Australia).Looking at the source code I did not find a way how to set a custom configuration URL. For our purpose I have modified the source code of
CDNLoaderInteractor.swift
and changed a line in private functioncdnURL(from:)
to
This issue seems to be similar to this one auth0/lock#1311 where the problem was missing
configurationBaseUrl
parameter. However it was in a different library (JavaScript version of Lock, not iOS/Swift version).So the right solution might be adding such a configuration parameter to iOS version of Lock library as well. Or a similar change as I have made could be made to make it automagically work as it looks it should we working as stated here: https://auth0.com/docs/custom-domains/additional-configuration#auth0-js-and-other-sdks
(there is no mention that a
configurationBaseUrl
needs to be set).Lock 2.5.1 / iOS 11
The text was updated successfully, but these errors were encountered: