iOS Application not recognizing Auth0 Associated Domain

I am converting an iOS app from using native login to using the universal login flow, following the steps provided here: Auth0 iOS / macOS SDK Quickstarts: Add Login to your iOS or macOS app

I have setup the callback URLs and verified that the webcredentials entry matches, as well as set up my provisioning profile with associated domains. Every step in the walkthrough matches what is asked for, but I continue to get the following error:

Error Domain=com.apple.AuthenticationServices.WebAuthenticationSession Code=1 "Application with identifier {MY_IDENTIFIER} is not associated with domain {MY_AUTH0_DOMAIN}. Using HTTPS callbacks requires Associated Domains using the `webcredentials` service type for {MY_AUTH0_DOMAIN}"

I have cleared derived data and tested on simulators and my personal device with the same result. At a bit of a loss on what to do next.

1 Like

Having the same issue, for iOS 17.4 onwards.

:wave: @tylermills :sunglasses:

Would I be right in thinking you also posted about this on our GitHub repo for Flutter (see here)? Did you end up solving the problem? I’ve not specifically researched this issue, but Widcket’s comment - which is essentially related to information caching - would seem to make sense.

As mentioned, you can check the information Apple holds by visiting https://app-site-association.cdn-apple.com/a/v1/YOUR_AUTH0_DOMAIN_OR_CUSTOM_DOMAIN. Typically, this should match the information provided by https://YOUR_AUTH0_DOMAIN_OR_CUSTOM_DOMAIN/.well-known/apple-app-site-association - i.e. the AASA file data hosted by Auth0. At least for the appID in question.

If there’s a mismatch, then it’s likely going to be in the domain name portion, and would typically be a result of switching from using the out-of-box Auth0 Domain Name to using a Custom Domain Name (or vice-versa). In essence, one domain is being used with Auth0, whilst the other has been cached by Apple.

According to the Apple Documentation, it looks like it’s possible to add associated domain entitlements; it also mentions that the Apple CDN will update periodically, so the problem would likely fix itself…eventually! :smile:

Another possible solution could be to delete the App definition and create a new one (with a new App ID). However, this would likely have a knock-on effect on your application - including the need to change the Application (Client) definition in Auth0.

I’d be very interested to know how you ended up solving the issue, so please feel free to post an update here when you have the chance and let us know how you got on. Cheers :sunglasses: