I am developing a daemon-based product that needs a cryptographic, non-spoofable proof of machine identity so a remote management server can grant permissions based on the physical machine.
I was thinking to create a signing key in the Secure Enclave and use a certificate signed by that key as the machine identity. The problem is that the Secure Enclave key I can create is only accessible from user context, while my product runs as a system daemon and must not rely on user processes or launchAgents.
Could you please advise on the recommended Apple-supported approaches for this use case ?
Specifically, Is there a supported way for a system daemon to generate and use an unremovable Secure Enclave key during phases like the pre-logon, that doesn't have non user context (only the my application which created this key/certificate will have permission to use/delete it)
If Secure Enclave access from a daemon is not supported, what Apple-recommended alternatives exist for providing a hardware-backed machine identity for system daemons?
I'd rather avoid using system keychain, as its contents may be removed or used by root privileged users.
The ideal solution would be that each Apple product, would come out with a non removable signing certificate, that represent the machine itself (lets say that the cetificate name use to represent the machine ID), and can be validated by verify that the root signer is "Apple Root CA"
Prioritize user privacy and data security in your app. Discuss best practices for data handling, user consent, and security measures to protect user information.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
Hello everybody,
in my React Native-Expo-Firebase app, I am trying to integrate Sign in with Apple, along with the related token revocation at user deletion.
I did succeed in integrating the login, and the app correctly appears in the Apple Id list (the list of apps currently logged with Apple ID).
The problem is that, if I select the app and press "Interrupt Apple login usage for this app", the app simply stays there, nothing happens.
If I do the same with another app, this works fine.
Either if I do this via my iPhone's settings, or via https://account.apple.com/account/manage -> Sign in with Apple, I get the same result, the app cannot be removed.
I hope I managed to explain my situation clearly, I'd be happy to provide more info if necessary.
Thank you in advance.
Topic:
Privacy & Security
SubTopic:
Sign in with Apple
Tags:
Accounts
Privacy
Sign in with Apple
Authentication Services
Platforms: macOS 15.x (Sequoia), Intel-Based
App type: Endpoint Security (ES) client, notarized Developer ID app + LaunchDaemon
Goal: Boot-time ES client that runs on any Mac (managed or unmanaged)
Summary
Our ES client launches and functions when started manually (terminal), but when loaded as a LaunchDaemon it fails to initialize the ES connection with:
(libEndpointSecurity.dylib) Failed to open service: 0xe00002d8: Caller lacks TCC authorization for Full Disk Access
We can’t find a supported way to grant Full Disk Access (SystemPolicyAllFiles) to a system daemon on unmanaged Macs (no MDM). Local installation of a PPPC (TCC) profile is rejected as “must originate from a user-approved MDM server.”
We’re seeking confirmation: Is MDM now the only supported path for a boot-time ES daemon that requires FDA? If so, what’s Apple’s recommended approach for unmanaged Macs?
Environment & Artifacts
Binary (path placeholder):
/Library/Application Support///App/.app/Contents/MacOS/
Universal (x86_64 + arm64)
Notarized, hardened runtime; Developer ID Team <TEAM_ID>
Entitlements include:
com.apple.developer.endpoint-security.client (present)
Daemon plist (simplified; placeholders used):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict>
<key>Label</key> <string>com.example.esd</string>
<key>Program</key>
<string>/Library/Application Support/<VENDOR>/<PRODUCT>/Platform/<daemon-exec></string>
<key>WorkingDirectory</key>
<string>/Library/Application Support/<VENDOR>/<PRODUCT>/Platform</string>
<key>RunAtLoad</key><true/>
<key>KeepAlive</key><true/>
</dict></plist>
Designated requirement (abridged & masked):
identifier "<BUNDLE_ID>" and anchor apple generic and certificate 1[...] and
certificate leaf[...] and certificate leaf[subject.OU] = "<TEAM_ID>"
What works
Launching the ES client manually (interactive shell) succeeds; ES events flow.
Signature, notarization, entitlements, Gatekeeper: all OK.
What fails (daemon)
launchctl print system/ shows it starts, but Console logs:
(libEndpointSecurity.dylib) Failed to open service: 0xe00002d8:Caller lacks TCC authorization for Full Disk Access
System TCC DB shows ES consent rows but no allow for TCCServiceSystemPolicyAllFiles for the daemon binary.
Installing a PPPC mobileconfig locally (system scope) is blocked as “must originate from a user-approved MDM server.”
Repro (minimal)
Install app bundle + LaunchDaemon plist above (placeholders).
Verify entitlements & notarization:
codesign -dvvv --entitlements :- ""
spctl --assess --type execute -vv ""
Start daemon & watch logs:
sudo launchctl bootstrap system "/Library/LaunchDaemons/.plist"
log stream --style compact --predicate 'process == "" OR subsystem == "com.apple.TCC"' --info
Observe FDA denial message only in daemon context.
Attempt to add FDA via PPPC profile (system scope) → rejected unless installed by user-approved MDM.
Questions for Apple
On macOS 14/15, is Full Disk Access for system daemons strictly MDM-only via PPPC (i.e., not installable locally)?
Under what conditions would libEndpointSecurity report a Full Disk Access denial at client initialization, given ES consent is distinct from FDA?
For unmanaged Macs needing boot-time ES processing, does Apple recommend a split: root LaunchDaemon (ES subscription; no protected file I/O) + per-user LaunchAgent (user-granted FDA) via XPC for on-demand disk access?
Would moving ES connection code into a System Extension change FDA requirements for unmanaged devices, or is FDA still governed by PPPC/MDM?
If behavior changed across releases, can Apple confirm the intended policy so vendors can document MDM requirements vs. unmanaged install paths?
What we’ve tried
Verified signature, notarization, hardened runtime, ES entitlement present.
Confirmed context difference: manual run OK; daemon fails.
Inspected system TCC: ES consent rows present; no FDA allow for daemon.
Tried installing system-scoped PPPC locally → blocked as “must originate from a user-approved MDM server.”
Considered LaunchAgent-only, but ES needs root; evaluating daemon+agent split to keep ES in root and put FDA-gated work in user space.
What we need
A definitive statement on the supported way to grant FDA to a system daemon on macOS 14/15.
If MDM PPPC is required, we’ll ship “daemon mode requires MDM” and provide a daemon+agent fallback for unmanaged devices.
If a compliant non-MDM path exists for daemon FDA on unmanaged Macs, please share exact steps.
Thanks! Happy to provide additional logs privately if helpful.
I have an Autofill Passkey Provider working for Safari and Chrome via WebAuthn protocol. Unfortunately, Chrome will not offer my extension as a logon credential provider unless I add the credential to the ASCredentialIdentityStore.
I wonder what is the best way to access the ASCredentialIdentityStore from an AutoFill extension? I understand I cannot access it directly from the extension context, so what is the best way to trigger my container app to run, based on a new WebAuthn registration? The best I can think of so far is for the www site to provide an App Link to launch my container app as part of the registration ceremony.
Safari will offer my extension even without adding it to the ASCredentialIdentityStore, so I guess I should file a request with Chrome to work this way too, given difficulty of syncing ASCredentialIdentityStore with WebAuthn registration.
Hello,
I'm an application developer related to Apple system extensions. I developed an endpoint security system extension that can run normally before the 14.x system. However, after I upgraded to 15.x, I found that when I uninstalled and reinstalled my system extension, although the system extension was installed successfully, a system warning box would pop up when I clicked enable in the Settings, indicating a failure.
I conducted the following test. I reinstalled a brand-new MAC 15.x system. When I installed my applications, the system extensions could be installed successfully and enabled normally. However, when I uninstalled and reinstalled, my system extension couldn't be enabled properly and a system warning popped up as well. I tried disabling SIP and enabling System Extension Developers, but it still didn't work.
When the system warning box pops up, I can see some error log information through the console application, including an error related to
Failed to authorize right 'com.apple.system-extensions.admin' by client '/System/Library/ExtensionKit/Extensions/SettingsSystemExtensionController.appex' [2256] for authorization created by '/System/Library/ExtensionKit/Extensions/SettingsSystemExtensionController.appex' [2256] (3,0) (-60005) (engine 179)
as shown in the screenshot.
The same problem, mentioned in Cannot approve some extensions in MacOS Sequoia , but there is no solution
I received Apple’s recent notice about the new requirement to provide a server-to-server notification endpoint when registering or updating a Services ID that uses Sign in with Apple.
(Official notice: https://developer.apple.com/news/?id=j9zukcr6
)
We already use Sign in with Apple on our website and app, but only as a login method for pre-registered users, not as a way to create new accounts.
That means users already exist in our system, and Apple login is used only for authentication convenience (similar to linking a social account).
I have some questions about how to properly implement the required server-to-server notifications in this case:
1. email-enabled / email-disabled:
We don’t use or store the email address provided by Apple.
Are we still required to handle these events, or can we safely ignore them if the email is not used in our system?
2. consent-revoked:
We don’t store Apple access or refresh tokens, we use them only during login and discard them immediately.
In this case, do we still need to handle token revocation, or can we simply unlink the Apple login from the user account when receiving this notification?
3. account-delete:
If a user deletes their Apple account, we can unlink the Apple login and remove related Apple data,
but we cannot delete the user’s primary account in our system (since the account exists independently).
Is this acceptable under Apple’s requirements as well?
We want to make sure our implementation aligns with Apple’s policy and privacy requirements, while maintaining consistency with our existing account management system.
If anyone from Apple or other developers who implemented similar logic could provide guidance or share examples, it would be greatly appreciated.
Thank you!
Topic:
Privacy & Security
SubTopic:
Sign in with Apple
Tags:
Sign in with Apple REST API
Sign in with Apple
I'm working on integrating Passkey functionality into my iOS app (targeting iOS 16.0+), and I'm facing an issue where the system dialog still shows the "Save to another device" option during Passkey registration. I want to hide this option to force users to create Passkeys only on the current device.
1. My Current Registration Implementation
Here’s the code I’m using to create a Passkey registration request. I’ve tried to use ASAuthorizationPlatformPublicKeyCredentialProvider (which is supposed to target platform authenticators like Face ID/Touch ID), but the "Save to another device" option still appears:
`// Initialize provider for platform authenticators
let provider = ASAuthorizationPlatformPublicKeyCredentialProvider(relyingPartyIdentifier: domain)
// Create registration request
let registrationRequest = provider.createCredentialRegistrationRequest(
challenge: challenge,
name: username,
userID: userId
)
// Optional configurations (tried these but no effect on "another device" option)
registrationRequest.displayName = "Test Device"
registrationRequest.userVerificationPreference = .required
registrationRequest.attestationPreference = .none
// Set up authorization controller
let authController = ASAuthorizationController(authorizationRequests: [registrationRequest])
let delegate = PasskeyRegistrationDelegate(completion: completion)
authController.delegate = delegate
// Trigger the registration flow
authController.performRequests(options: .preferImmediatelyAvailableCredentials)`
2. Observation from Authentication Flow (Working as Expected)
During the Passkey authentication flow (not registration), I can successfully hide the "Use another device" option by specifying allowedCredentials in the ASAuthorizationPlatformPublicKeyCredentialAssertionRequest. Here’s a simplified example of that working code:
let assertionRequest = provider.createCredentialAssertionRequest(challenge: challenge)
assertionRequest.allowedCredentials = allowedCredentials
After adding allowedCredentials, the system dialog no longer shows cross-device options—this is exactly the behavior I want for registration.
3. My Questions
Is there a similar parameter to allowedCredentials (from authentication) that I can use during registration to hide the "Save to another device" option?
Did I miss any configuration in the registration request (e.g., authenticatorAttachment or other properties) that forces the flow to use only the current device’s platform authenticator?
Are there any system-level constraints or WebAuthn standards I’m overlooking that cause the "Save to another device" option to persist during registration?
Any insights or code examples would be greatly appreciated!
We are using Apple's PSSO to federate device login to out own IdP. We have developed our own extension app and deployed it using MDM. Things works fine but there are 2 issues that we are trying to get to the root cause -
On some devices after restarting we see an error message on the logic screen saying "The registration for this device is invalid and must be repaired"
And other error message is "SmartCard configuration is invalid for this account"
For the 1st we have figured out that this happens when the registration doesn't happen fully and the key is not tied to the user so when the disk needs to be decrypted at the FileVault screen the issue is raised.
For the "SmartCard configuration is invalid for this account" issue also one aspect is invalid registration but there has been other instances as well where the devices were registered completely but then also the the above error was raised. We verified the registration being completed by checking if the SmartCard is visible in the System Report containing the key.
Has anyone seen the above issues and any possible resolution around it?
I have reached out to support and they simply tell me they are unable to help me, first redirecting me to generic Apple support, after following up they provided the explanation that they only handle administrative tasks and to post on the forums.
I am unable to change my App Tracking Transparency it provides no real error, though network traffic shows a 409 HTTP response from the backend API when trying to save. Here is a screenshot of the result when trying to save.
Does anyone have any suggestions on how to get this resolved? I've commented back to the reviewers and they simply provided help documentation. I have a technical issue and am unable to get anyone to help resolve this.
Hey everyone, I'm hitting a really frustrating issue with App Attest. My app was working perfectly with DCAppAttestService on October 12th, but starting October 13th it started failing with DCError Code 2 "Failed to fetch App UUID" at DCAppAttestController.m:153. The weird part is I didn't change any code - same implementation, same device, same everything.
I've tried switching between development and production entitlement modes, re-registered my device in the Developer Portal, created fresh provisioning profiles with App Attest capability, and verified that my App ID has App Attest enabled. DCAppAttestService.isSupported returns true, so the device supports it. Has anyone else run into this? This is blocking my production launch and I'm not sure if it's something on my end or an Apple infrastructure issue.
I'm experiencing an issue with Sign In with Apple integration in my React Native Expo app (Bundle ID: com.anonymous.TuZjemyApp).
Problem Description:
When users attempt to sign in using Sign In with Apple, they successfully complete Face ID/password authentication, but then receive a "Sign-Up not completed" error message. The authentication flow appears to stop at this point and doesn't return the identity token to my app.
Technical Details:
Frontend Implementation:
Using expo-apple-authentication.
Requesting scopes: FULL_NAME and EMAIL
App is properly configured in app.json with:
usesAppleSignIn: true
Entitlement: com.apple.developer.applesignin
Backend Implementation:
Endpoint: POST /api/auth/apple
Using apple-signin-auth package for token verification
Verifying tokens with audience: com.anonymous.TuZjemyApp
Backend creates/updates user accounts based on Apple ID
Question:
I'm not sure why the authentication flow stops with "Sign-Up not completed" after successful Face ID verification. The identity token never reaches my app. Could you please help me understand:
What might cause this specific error message?
Are there any additional Apple Developer Portal configurations required?
Could this be related to app capabilities or entitlements?
Is there a specific setup needed for the app to properly receive identity tokens?
I set up provisioning profiles, and added Sign in with Apple as a capability and still it doesn't work.
Hello, I currently have an app that includes the "Sign in with Apple" feature, and I need to transfer this app to another app team. I have reviewed all official documentation but have not found the answer I need. My situation has some specificities, and I hope to receive assistance.
The .p8 key created by the original developer team has been lost, and the app’s backend does not use a .p8 key for verification—instead, it verifies by obtaining Apple’s public key. However, according to the official documentation I reviewed, obtaining a transfer identifier during the app transfer process requires a client_secret generated from the original team’s .p8 key. This has left us facing a challenge, and we have two potential approaches to address this issue:
Q1: During the transfer, is it possible to skip obtaining the transfer identifier and proceed directly with the app transfer, without performing any backend operations? Is this approach feasible?
Q2: If the above approach is not feasible, should we create a new .p8 key in the original team’s account and use this new key for the transfer? If a new key is generated, do we need to re-release a new version of the app before initiating the transfer?
If neither of the above approaches is feasible, are there better solutions to resolve our issue? I hope to receive a response. Thank you.
TN3159: Migrating Sign in with Apple users for an app transfer | Apple Developer Documentation/
https://developer.apple.com/documentation/signinwithapple/transferring-your-apps-and-users-to-another-team
Topic:
Privacy & Security
SubTopic:
Sign in with Apple
Tags:
Sign in with Apple REST API
Sign in with Apple
I recently turned on the enhanced security options for my macOS app in Xcode 26.0.1 by adding the Enhanced Security capability in the Signing and Capabilities tab. Then, Xcode adds the following key-value sets (with some other key-values) to my app's entitlements file.
<key>com.apple.security.hardened-process.enhanced-security-version</key>
<integer>1</integer>
<key>com.apple.security.hardened-process.platform-restrictions</key>
<integer>2</integer>
These values appear following the documentation about the enhanced security feature (Enabling enhanced security for your app) and the app works without any issues.
However, when I submitted a new version to the Mac App Store, my submission was rejected, and I received the following message from the App Review team via the App Store Connect.
Guideline 2.4.5(i) - Performance
Your app incorrectly implements sandboxing, or it contains one or more entitlements with invalid values. Please review the included entitlements and sandboxing documentation and resolve this issue before resubmitting a new binary.
Entitlement "com.apple.security.hardened-process.enhanced-security-version" value must be boolean and true.
Entitlement "com.apple.security.hardened-process.platform-restrictions" value must be boolean and true.
When I changed those values directly in the entitlements file based on this message, the app appears to still work. However, these settings are against the description in the documentation I mentioned above and against the settings Xcode inserted after changing the GUI setting view.
So, my question is, which settings are actually correct to enable the Enhanced Security and the Additional Runtime Platform Restrictions?
Problem Summary
I'm experiencing a persistent invalid-credential error with Apple Sign-In on iOS despite having verified every aspect of the configuration over the past 6 months. The error occurs at the Firebase Authentication level after successfully receiving credentials from Apple.
Error Message: Firebase auth error: invalid-credential - Invalid OAuth response from apple.com. Environment
Platform: iOS (Flutter app)
Firebase Auth: v5.7.0
Sign in with Apple: v6.1.2
Xcode: Latest version with capability enabled
iOS Target: 13.0+
Bundle ID: com.harmonics.orakl
What Actually Happens
✅ Apple Sign-In popup appears
✅ User can authenticate with Apple ID
✅ Apple returns credentials with identityToken
❌ Firebase rejects with invalid-credential error
The error occurs at Firebase level, not Apple level.
What I've Tried
Created a brand new Apple Key (previous key was 6 months old)
Tested with both App ID and Service ID in Firebase
Completely reinstalled CocoaPods dependencies
Verified nonce handling is correct (hashed to Apple, raw to Firebase)
Activated Firebase Hosting and attempted to deploy .well-known file
Checked Cloud Logging (no detailed error messages found)
Disabled and re-enabled Apple Sign-In provider in Firebase
Verified Return URL matches exactly
Waited and retried multiple times over 6 months
Questions
Is the .well-known/apple-developer-domain-association.txt file required? If yes, how should it be generated? Firebase Hosting doesn't auto-generate it.
Could there be a server-side caching/blacklist issue with my domain or Service ID after multiple failed attempts?
Should the Apple Key be linked to the Service ID instead of the App ID? The key shows as linked to Z3NNDZVWMZ.com.harmonics.orakl (the App ID).
Is there any way to get more detailed error logs from Firebase about why it's rejecting the Apple OAuth response?
Could using a custom domain instead of .firebaseapp.com resolve the issue?
Additional Context
Google Sign-In works perfectly on the same app
The configuration has been reviewed by multiple developers
Error persists across different devices and iOS versions
No errors in Xcode console except the Firebase rejection
Any help would be greatly appreciated. I've exhausted all standard troubleshooting steps and documentation.
Project Details:
Bundle ID: com.harmonics.orakl
Firebase Project: harmonics-app
Team ID: Z3N.......
code : // 1. Generate raw nonce
final String rawNonce = _generateRandomNonce();
// 2. Hash with SHA-256
final String hashedNonce = _sha256Hash(rawNonce);
// 3. Send HASHED nonce to Apple ✅
final appleCredential = await SignInWithApple.getAppleIDCredential(
scopes: [AppleIDAuthorizationScopes.email, AppleIDAuthorizationScopes.fullName],
nonce: hashedNonce, // Correct: hashed nonce to Apple
);
// 4. Create Firebase credential with RAW nonce ✅
final oauthCredential = OAuthProvider("apple.com").credential(
idToken: appleCredential.identityToken!,
rawNonce: rawNonce, // Correct: raw nonce to Firebase
);
// 5. Sign in with Firebase - ERROR OCCURS HERE ❌
await FirebaseAuth.instance.signInWithCredential(oauthCredential);
Topic:
Privacy & Security
SubTopic:
Sign in with Apple
Since October 3rd, I've stopped receiving responses to the Private Access Tokens challenge.
I'm using this link: https://demo-issuer.private-access-tokens.fastly.com/.well-known/token-issuer-directory. I receive tokens from Fastly and return a header to the iOS app, but then I don't receive another authentication request from iOS.
The user has automatic verification enabled on their phone. The problem is global and affects all my mobile app users.
Has anyone encountered a similar problem and found a solution?
Topic:
Privacy & Security
SubTopic:
General
Hello,
Thanks for the new video on Memory Integrity Enforcement!
Is the presented app's sample code available (so that we can play with it and find & fix the bug on our own, using Soft Mode)?
Thanks in advance!
Hello everyone,
We recently transferred our iOS app from one Apple Developer account to another, and after the transfer, we encountered a serious issue where all previously stored Keychain data and the local database became inaccessible.
As a result, all users are automatically logged out and lose access to their locally stored data (such as chat history) once they update to the new version signed with the new Team ID.
We understand that Keychain items are tied to the App ID prefix (Team ID), which changes during an app transfer. However, we’re looking for possible workarounds or best practices to avoid user data loss.
Questions:
Is there any reliable method to maintain or migrate access to old Keychain data after an app transfer?
Would reverting the app back to the original developer account and releasing an update from there (to persist or migrate data) before transferring it again be a viable solution?
Has anyone faced a similar issue and found a practical way to handle data persistence during an app transfer?
Any guidance, technical suggestions, or shared experiences would be highly appreciated. This issue is causing major impact for our users, so we’re hoping to find a safe and supported approach.
Thank you,
Mohammed Hassan
I'm trying to setup device attestation. I believe I have everything setup correctly but the final step of signature validation never succeeds. I've added validation on the client side for debugging and it doesn't validate using CryptoKit.
After the assertion is created, I try to validate it:
assertion = try await DCAppAttestService.shared.generateAssertion(keyId, clientDataHash: clientDataHash)
await validateAssertionLocallyForDebugging(keyId: keyId, assertionObject: assertion, clientDataHash: clientDataHash)
In the validateAssertionLocallyForDebugging method, I extract all the data from the CBOR assertionObject and then setup the parameters to validate the signature, using the key that was created from the original attestation flow, but it fails every time. I'm getting the public key from the server using a temporary debugging API.
let publicKeyData = Data(base64Encoded: publicKeyB64)!
let p256PublicKey = try P256.Signing.PublicKey(derRepresentation: publicKeyData)
let ecdsaSignature = try P256.Signing.ECDSASignature(derRepresentation: signature)
let digestToVerify = SHA256.hash(data: authenticatorData + clientDataHash)
print(" - Recreated Digest to Verify: \(Data(digestToVerify).hexDescription)")
if p256PublicKey.isValidSignature(ecdsaSignature, for: digestToVerify) {
print("[DEBUG] SUCCESS: Local signature validation passed!")
} else {
print("[DEBUG] FAILED: Local signature validation failed.")
}
I have checked my .entitlements file and it is set to development. I have checked the keyId and verified the public key. I have verified the public key X,Y, the RP ID Hash, COSE data, and pretty much anything else I could think of. I've also tried using Gemini and Claude to debug this and that just sends me in circles of trying hashed, unhashed, and double hashed clientData. I'm doing this from Xcode on an M3 macbook air to an iPhone 16 Pro Max. Do you have any ideas on why the signature is not validating with everything else appears to be working?
Thanks
I've come across strange behavior with the userID property on the returned credential from a passkey attestation.
When performing a cross-device passkey assertion between iOS and Android by scanning the generated QR code on my iPhone with an Android device the returned credential object contains an empty userID.
This does not happen when performing an on device or cross-device assertion using two iPhones.
Is this expected behavior, or is there something I'm missing here? I couldn't find any more information on this in the documentation.
iOS Version: 26.0.1, Android Version: 13
Topic:
Privacy & Security
SubTopic:
General
Tags:
Passkeys in iCloud Keychain
Authentication Services
I have a project with a single app target that serves two environments, and two schemes, one for each env, using xcconfig files for defining environment-specific stuff.
I'm trying to figure this out for months, so I've tried multiple approaches throughout this period:
Have a single domain in "Associated domains" in Xcode, defined as webcredentials:X where X gets replaced using a value from xcconfig.
Have two domain entries in "Associated domains" webcredentials:PROD_DOMAIN and webcredentials:STAGING_DOMAIN.
Have a different order of domains
Results are very interesting: whatever I do, whatever approach I take, password autofill works on staging, but doesn't work on production. I'm aware that we need to test production on Test Flight and AppStore builds. That's how we're testing it, and it's not working. Tested on multiple devices, on multiple networks (wifi + mobile data), in multiple countries.. you name it.
The server side team has checked their implementation a dozen times; it's all configured properly, in the exact same way across environments (except bundle ID, ofc).
We tried a couple websites for validating the apple-app-site-association file, and while all of those are focused on testing universal links, they all reported that the file is configured properly. Still, password autofill doesn't work.
I prefer not to share my app's domains publicly here. Ideally I would contact Apple Developer Support directly, but they now require a test project for that, and since 'a test project' is not applicable to my issue, I'm posting here instead.