I'm experiencing a strange issue where ASWebAuthenticationSession works perfectly when running from Xcode (both Debug and Release), but fails on TestFlight builds.
The setup:
iOS app using ASWebAuthenticationSession for OIDC login (Keycloak)
Custom URL scheme callback (myapp://)
prefersEphemeralWebBrowserSession = false
The issue:
When using iOS Keychain autofill (with Face ID/Touch ID or normal iphone pw, that auto-submits the form) -> works perfectly
When manually typing credentials and clicking the login button -> fails with white screen
When it fails, the form POST from Keycloak back to my server (/signin-oidc) never reaches the server at all. The authentication session just shows a white screen.
Reproduced on:
Multiple devices (iPhone 15 Pro, etc.)
iOS 18.x
Xcode 16.x
Multiple TestFlight testers confirmed same behavior
What I've tried:
Clearing Safari cookies/data
prefersEphemeralWebBrowserSession = true and false
Different SameSite cookie policies on server
Verified custom URL scheme is registered and works (testing myapp://test in Safari opens the app)
Why custom URL scheme instead of Universal Links:
We couldn't get Universal Links to trigger from a js redirect (window.location.href) within ASWebAuthenticationSession. Only custom URL schemes seemed to be intercepted. If there's a way to make Universal Links work in this context, without a manual user-interaction we'd be happy to try.
iOS Keychain autofill works
The only working path is iOS Keychain autofill that requires iphone-authentication and auto-submits the form. Any manual form submission fails, but only on TestFlight - not Xcode builds.
Has anyone encountered this or know a workaround?
Authentication Services
RSS for tagImprove the experience of users when they enter credentials to establish their identity using Authentication Services.
Posts under Authentication Services tag
89 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi everyone,
I'm currently working on a native macOS app (built with SwiftUI) and I'm trying to implement Password AutoFill functionality so users can use their saved credentials from Keychain or third-party password managers.
I've gone through Apple's documentation, WWDC sessions, and sample code, but I've noticed that the resources primarily focus on iOS and web implementations. There's very limited guidance specifically for macOS.
I've set up:
Associated Domains entitlement with the webcredentials: service
The apple-app-site-association file on my server
TextField with .textContentType(.username) and SecureField with .textContentType(.password)
However, I'm still not seeing the expected AutoFill behavior on macOS like I would on iOS.
Has anyone successfully implemented Password AutoFill on a native macOS app? Are there any macOS-specific considerations or additional steps required that differ from iOS?
Any guidance, sample code, or pointers to documentation I might have missed would be greatly appreciated.
I noticed, that even though my AutoFill Credential Provider Extension works with Safari for both Passwords and Passkeys, it doesn't work in context menus inside arbitrary textfields, meanwhile the same is true for the Apple Passwords app. This is a great hit to AutoFill productivity, as my extension is unable to fill textfields by just going to the context menu and clicking AutoFill > Passwords..
Is this a feature only available to Apple via private APIs, or is this something I can interface with?
I checked and the Passwords app does use some undocumented but non-private entitlements:
[Key] com.apple.authentication-services.access-credential-identities
[Value]
[Bool] true
I also checked the responsible executable for some hints (AutoFillPanelService) however found nothing that would lead me to believe this is a public extension point.
Another idea I had was trying to use a macOS Service for this, however Services in the "General" category won't show up in any context menu, only in the Application's Main Menu.
While working with Platform SSO on macOS, I’m trying to better understand how the system handles cases where a user’s local account password becomes unsynchronized with their Identity Provider (IdP) password—for example, when the device is offline during a password change.
My assumption is that macOS may store some form of persistent token during the Platform SSO user registration process (such as a certificate or similar credential), and that this token could allow the system to unlock the user’s login keychain even if the local password no longer matches the IdP password.
I’m hoping to get clarification on the following:
Does macOS actually use a persistent token to unlock the login keychain when the local account password is out of sync with the IdP password? If so, how is that mechanism designed to work?
If such a capability exists, is it something developers can leverage to enable a true passwordless authentication experience at the login window and lock screen (i.e., avoiding the need for a local password fallback)?
I’m trying to confirm what macOS officially supports so I can understand whether passwordless login is achievable using the persistent-token approach.
Thanks in advance for any clarification.
Topic:
Privacy & Security
SubTopic:
General
Tags:
Security
Authentication Services
CryptoTokenKit
Platform SSO
I'm trying to sync authentication data from my iOS app to a Safari Web Extension using App Groups, but the extension isn't consistently receiving the data.
Setup:
App Group: group.com.airaai.AiraApp (configured in both app and extension)
iOS app writes auth data using UserDefaults(suiteName: "group.com.airaai.AiraApp")
Extension's Swift SafariWebExtensionHandler reads from App Groups in beginRequest()
Extension's JavaScript reads from browser.storage.local
Problem:
Extension popup always shows "logged out" even when:
User is logged into main iOS app
Auth data exists in App Groups (verified via native module logs)
Handler successfully writes test values to extension storage
Current Behavior:
Handler CAN read from App Groups ✅
Handler CAN write test values to extension storage ✅
But auth data doesn't appear in browser.storage.local when popup checks ❌
Popup reads empty keys even though handler logged writing them
Code:
// Handler reads from App Groups
guard let sharedDefaults = UserDefaults(suiteName: "groupName") else { return }
let authData = sharedDefaults.string(forKey: "auth_data")
// Handler writes to extension storage (tried multiple suite names)
let extensionDefaults = UserDefaults(suiteName: Bundle.main.bundleIdentifier ?? "")
extensionDefaults?.set(authData, forKey: "oauth_token")
extensionDefaults?.synchronize()
// Popup reads from storage
browser.storage.local.get(['oauth_token']).then(data => {
console.log(data); // Always empty {}
});
What I've tried:
✅ App Groups properly configured in both targets
✅ Extension has App Groups capability enabled
✅ Multiple UserDefaults suite names (bundle ID, bundle ID + suffix)
✅ Delayed sync attempts in handler
✅ Comprehensive logging
Questions:
What is the correct UserDefaults suite name for Safari extension storage on iOS?
When does beginRequest() get called? Can it be triggered manually?
Is App Groups the right approach, or should I use a different pattern?
Alternatives I've considered:
Deep link/redirect method (app opens Safari with token in URL)
Content script intercepts URL and sends to background script
Is this a supported approach for iOS Safari extensions?
Any guidance or examples would be greatly appreciated!
Recently, we have adapted the passkey function on the Mac, but we always encounter the error message "Unable to verify the web credentials association of xxx with domain aaa. Please try again in a few seconds."
We can confirm that https://aaa/.well-known/apple-app-site-association has been configured and is accessible over the public network. Additionally, the entitlements in the app have also been set with webcredentials:aaa.
This feature has been experiencing inconsistent performance. When I restart my computer or reinstall the pkg, this feature may work or it may still not work. I believe this is a system issue.
Here is feed back ID: FB20876945
In the feedback, I provided the relevant logs.
If you have any suggestions or assistance, please contact me. I would be extremely grateful!
Topic:
Privacy & Security
SubTopic:
General
Tags:
macOS
Objective-C
Authentication Services
Passkeys in iCloud Keychain
Hello,
When using ASWebAuthenticationSession with an HTTPS callback URL (Universal Link), I receive the following error:
Authorization error: The operation couldn't be completed.
Application with identifier jp.xxxx.yyyy.dev is not associated with domain xxxx-example.go.link.
Using HTTPS callbacks requires Associated Domains using the webcredentials service type for xxxx-example.go.link.
I checked Apple’s official documentation but couldn’t find any clear statement that webcredentials is required when using HTTPS callbacks in ASWebAuthenticationSession.
What I’d like to confirm:
Is webcredentials officially required when using HTTPS as a callback URL with ASWebAuthenticationSession?
If so, is there any official documentation or technical note that states this requirement?
Environment
iOS 18.6.2
Xcode 16.4
Any clarification or official references would be greatly appreciated.
Thank you.
Topic:
Privacy & Security
SubTopic:
General
Tags:
iOS
Security
Authentication Services
Universal Links
Is there any particular reason why ASWebAuthenticationSession doesn't have support for async/await? (example below)
do {
let callbackURL = try await webAuthSession.start()
} catch {
// handle error
}
I'm curious if this style of integration doesn't exist for architectural reasons? Or is the legacy completion handler style preserved in order to prevent existing integrations from breaking?
Hi everyone — I’m developing an iOS passkey/password manager where the private key material must be stored on a physical device (NFC card / USB token). I’m hitting a hard limitation: CoreNFC is not available for use from app extensions, which prevents an appex (e.g. password/credential provider or other extension) from talking directly to an NFC card during an authentication flow. 
My questions:
1. Is there any plan to make CoreNFC (or some limited NFC-API) available to app extensions in a future iOS version? If not, could Apple clarify why (security/entitlements/architecture reasons)?
2. Are there any recommended/approved workarounds for a passkey manager extension that needs to access a physical NFC token during authentication? (For example: background tag reading that launches the containing app, or some entitlement for secure NFC card sessions.) I’ve read about background tag reading, but that seems to be about system/OS handling of tags rather than giving extensions direct NFC access. 
3. Is the only supported pattern for my use case to have the containing app perform NFC operations and then share secrets with the extension via App Groups / Keychain Sharing / custom URL flow? (I’m already evaluating App Groups / Keychain access groups for secure sharing, but I’d like official guidance.) 
Implementation details that may help responders:
• Target: iOS (latest SDK), building a Credential Provider / password manager extension (appex).
• Intended physical token: NFC smartcard / ISO7816 contactless (so CoreNFC APIs like NFCISO7816Tag would be ideal).
• Security goals: private key never leaves the physical token; extension should be able to trigger/sign during a browser/app AutoFill flow.
Possible alternatives I’m considering (open to feedback): designing the UX so that the extension opens the main app (only possible for Today widget in a supported way) which runs the NFC flow and stores/returns a short-lived assertion to the extension. Are any of these patterns sanctioned / recommended by Apple for credential providers? 
Thanks — any pointers to docs, entitlement names, or example apps/samples would be extremely helpful.
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
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 am currently implementing a biometric authentication registration flow using WebAuthn. I am using ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest, and I would like to know if there is a way to hide the "Save to another device" option that appears during the registration process.
Specifically, I want to guide users to save the passkey only locally on their device, without prompting them to save it to iCloud Keychain or another device.
If there is a way to hide this option or if there is a recommended approach to achieve this, I would greatly appreciate your guidance.
Also, if this is not possible due to iOS version or API limitations, I would be grateful if you could share any best practices for limiting user options in this scenario.
If anyone has experienced a similar issue, your advice would be very helpful. Thank you in advance.
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
Hello,
We received a rejection on one of our IOS applications because we were doing Microsoft MSAL login through the user's browser. The representative recommended that we use Webview to do in-app logins. However when we tried to handle the custom app uri redirection (looking like myapp://auth/), Webview does not seem to send the user back to the application. Does anyone have a fix for this?
Thanks!
Topic:
Privacy & Security
SubTopic:
General
Tags:
Safari and Web
UI Frameworks
Authentication Services
WebKit
Hi! I'm trying to implement ASWebAuthenticationSession to log in to my app via the web app backend. However, I'm a bit confused about the cookies that this has access to. When I set prefersEphemeralWebBrowserSession=false it does not seem to use the cookies from Safari. Or at least, I'm logged into my web app in Safari, but when I use ASWebAuthenticationSession I still have to log in again. Does it not share session cookies with Safari?
I did notice that if I don't use an ephemeral session, once I log out and try to log back in my app does automatically log me in but that's actually unhelpful in my opinion because now I have no way to clear that session because it only lives in the ASWebAuthenticationSession context. If that's the case I may as well use the ephemeral session then because it seems to have only drawbacks.
I’m implementing passkey registration and authentication in an iOS 17 app with a credential provider extension, but I’m running into an issue.
Setup:
I have a credential provider target configured.
The app correctly shows the pop-up to register the passkey with my app.
My Info.plist is set up properly.
Issue: When the following function is triggered:
override func prepareInterface(forPasskeyRegistration registrationRequest: ASCredentialRequest) {
"code to generate registrationRequest..."
let controller = ASAuthorizationController(authorizationRequests: [registrationRequest])
controller.delegate = self
controller.presentationContextProvider = self
controller.performRequests()
}
I get the following error: Domain=com.apple.AuthenticationServices.AuthorizationError Code=1004
I do not own the relying party domain (e.g., https://webauthn.io), so I cannot configure an apple-app-site-association file on the website.
Question:
How can I register and authenticate passkeys on any site that allows passkeys (such as webauthn.io) when I don’t control the webpage? Are there any workarounds or best practices for handling this in iOS 17?
Any insights would be greatly appreciated!
Topic:
Privacy & Security
SubTopic:
General
Tags:
Authentication Services
Passkeys in iCloud Keychain
On iOS when I run my Autofill extension target from Xcode and attach to Safari, Swift print() statements appear in the Xcode console log. If I run the same extension on MacOS Sequoia, no log messages appear. The header strip in the debugger area remains blank. Anyone know how to see these log messages?
In both cases, the scheme is set to Debug build, and "Debug Executable" is not selected. In fact, for iOS the "Debug Executable" is grayed out. When I set Debug Executable on the MacOS run, I get failure to attach with a warning about permission to debug Safari.
My application is supporting hybrid transport on FIDO2 webAuthn specs to create credential and assertion. And it support legacy passkeys which only mean to save to 1 device and not eligible to backup.
However In my case, if i set the Backup Eligibility and Backup State flag to false, it fails on the completion of the registrationRequest to save the passkey credential within credential extension, the status is false instead of true.
self.extension.completeRegistrationRequest(using: passkeyRegistrationCredential)
The attestation and assertion flow only works when both flags set to true.
Can advice why its must have to set both to true in this case?
Hi,
We are using the MSAL library to authenticate users, with SSO authentication implemented through the Microsoft Authenticator app.
The problem is that once or twice a day, a prompt for forced authentication appears, indicating that silent token acquisition is failing and resulting in a requirement for forced authentication. Below are some of the logs:
=================================================
2025-08-28 11:00:05.034 [Info] [AppDelegate.swift:121] application(:didFinishLaunchingWithOptions:) > MSAL message: TID=751353 MSAL 1.8.1 iOS 18.5 [2025-08-28 10:00:05 - EC9D1457-2D70-4878-926F-553391EBC9D3] [MSAL] Silent flow finished. Result (null), error: -51115 error domain: MSIDErrorDomain
2025-08-28 11:00:05.034 [Info] [AppDelegate.swift:121] application(:didFinishLaunchingWithOptions:) > MSAL message: TID=751353 MSAL 1.8.1 iOS 18.5 [2025-08-28 10:00:05 - EC9D1457-2D70-4878-926F-553391EBC9D3] [MSAL] acquireTokenSilent returning with error: (MSALErrorDomain, -50002) Masked(not-null)
====================================================
We initially raised this issue with Microsoft, but according to them:
In the app's logs, the single one failure it contains, was when the SSO extension returned the error com.apple.AuthenticationServices.AuthorizationError, -6000 during a silent call. This error code is generated by the system framework (Apple), not by our code. It indicates that the framework encountered an unexpected internal issue before or after calling the SSO extension.
MSAL returning interaction_required to the client app is the most effective way to recover from this error (as you mention, after the user selects the account the app continues working as expected).
Additionally, as you also mention, the interactive call is made by switching to Authenticator (not displaying a "window" without leaving Eva Lite app), which means MSAL is not able to use the SSO extension and is using the fallback to legacy authentication.
The recommended next step is for the customer to request support directly from Apple as this is an issue on their side. Additionally, the customer can also try to update to the latest iOS, in case Apple has already fixed this issue.
=============================================
STEPS TO REPRODUCE
There is no such steps its just that this is an enterprise application which is getting used on managed devices[iPhone 14]. The device are managed using some intune policy.
Platform and Version:
iOS
Development Environment: Xcode 15, macOS 13.6.1
Run-time Configuration: iOS 18
Please let me know if there are any solutions to resolve this problem. Thank you.
I keep getting the following error when trying to run Passkey sign in on macOS.
Told not to present authorization sheet: Error Domain=com.apple.AuthenticationServicesCore.AuthorizationError Code=1 "(null)"
ASAuthorizationController credential request failed with error: Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1004 "(null)"
This is the specific error.
Application with identifier a is not associated with domain b
I have config the apple-app-site-association link and use ?mode=developer
Could there be any reason for this?
Topic:
Privacy & Security
SubTopic:
General
Tags:
macOS
Objective-C
Authentication Services
Passkeys in iCloud Keychain