Hi, after adding passkey to my flow im getting fro...
# ask-a-descoper
t
Hi, after adding passkey to my flow im getting from ios devices: "ASAuthorizationController AuthorizationError Code=1004" i was trying to add an Associated domain of: api.descope.com but yet, same result. please help me find out what should i add. Thanks.
m
@Rahul Rijhwani @Gil Shapira can you help here ?
r
@Tamir Yakov can you share project id
t
P31S2Pxg4oYOKmEC4T3I6mi2H7lH
@Rahul Rijhwani
šŸ‘€ 1
r
@Tamir Yakov The ASAuthorizationController error code 1004 typically indicates an associated domain configuration issue. For iOS passkeys with Descope, you need to configure your associated domain correctly. The correct associated domain setup: For iOS, ensure your app has an associated domain configured with the
webcredentials
service type, and its value must match the top-level domain you set up in the Descope console. The domain should not be
api.descope.com
- instead, it should match your top-level domain configured in the Descope console's Passkey/WebAuthn settings. Steps to fix: 1. Go to the Descope console and check your Passkey/WebAuthn settings 2. Note the top-level domain configured there 3. In your iOS app, configure the associated domain to match that exact domain with the
webcredentials
service type For complete iOS setup guidance, refer to https://docs.descope.com/auth-methods/passkeys/with-sdks/mobile https://developer.apple.com/documentation/authenticationservices/supporting-passkeys
šŸ‘ 1
t
@Rahul Rijhwani still not working. i added "https://api.descope.columbus.com" as my app url in the configuration and add the associate domain -
Copy code
<key>com.apple.developer.associated-domains</key>
<array>
    <string>webcredentials:api.descope.columbus.com</string>
    <string>webcredentials:passkey.api.descope.columbus.com</string>
</array>
šŸ‘€ 1
still got the same error
r
Your associated domain configuration looks correct. The issue might be that you need to verify your domain ownership with Apple. For iOS passkeys to work, you need: 1 - Associated domain in your app (which you have):
Copy code
<key>com.apple.developer.associated-domains</key>
<array>
    <string>webcredentials:api.descope.columbus.com</string>
</array>
2 - Apple App Site Association (AASA) file: You need to host an
apple-app-site-association
file at
https://api.descope.columbus.com/.well-known/apple-app-site-association
This file should contain your app's bundle identifier and team ID to prove domain ownership. Note: You likely only need one associated domain entry -
webcredentials:api.descope.columbus.com
- not both entries you have listed. For complete iOS setup, refer to Apple's Supporting Passkeys guide
g
@Tamir Yakov I recommend following @Rahul Rijhwani’s instructions and Apple's guide. Please note: 1. One thing that's easy to overlook is that whatever hosting software you use on
api.descope.columbus.com
to serve the
/.well-known/apple-app-site-association
document MUST return an HTTP header with
content-type: application/json
when responding to the
GET
request. I'm emphasizing this since some web servers won't do this automatically. 2. The
api.descope.columbus.com
host must be reachable for the iOS devices to pull the domain setup. I couldn't load URL when I tried to run the validator below. 3. You can use this handy online validator here when all the setup is complete: https://branch.io/resources/aasa-validator/ 4. Lastly, I recommend doing all of the above and using the validator before testing with an actual app. Once iOS pulls a copy of the
apple-app-site-association
file it keeps it cached and it takes some voodoo (app reinstall, phone restart, etc) to make it get a fresh copy of the file (even during dev, when running via Xcode).