Problem Description:
In our App, When we launch the web login part using ASWebAuthentication + Universal Links with callback scheme as "https", we are not receiving callback.
Note:
We are using "SwiftUIWebAuthentication" Swift Package Manager to display page in ASWebAuth.
But when we use custom url scheme instead of Universal link, app able to receive call back every time.
We use ".onOpenURL" to receive universal link callback scheme.
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
93 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
(related post: How to optimize my app for for a carrier-provided satellite network? )
I am trying to implement an app so that it works under a carrier-provided satellite network.
The app uses (AS)WebAuthenticationSession for signing in. If the app is entitled to access a satellite network, will (AS)WebAuthenticationSession work as well?
How about WKWebView and SFSafariViewController?
Is there a way to test(simulate) a ultra-constrained network on a device or a simulator to see the expected behavior?
Thanks,
Topic:
App & System Services
SubTopic:
Networking
Tags:
Network
Safari and Web
CFNetwork
Authentication Services
(1) Context: Our project has a login feature via WEBVIEW (using SFSafariViewController) and integrates PassKey on the Web side.
The app listens for a successful login by capturing the redirect URL via the delegate of SFSafariViewController.
(2) Issue:
On iOS < 18.4: The redirect URL is captured with full parameters returned.
https://xyz.com/home?session_state=...&code=...
On iOS ≥ 18.4: The redirect URL is captured successfully but missing parameters.
https://xyz.com/home
We currently suspect that the issue originates from the SFSafariViewController framework after the release of iOS 18.4.
Has anyone experienced a similar issue?
We would also appreciate support from the Apple team.
We’re exploring the use of Apple’s Automatic Assessment Configuration entitlement for an iOS app currently in the proof-of-concept stage.
We’re enrolled in the Apple Developer Program with an active subscription. Both the Account Holder and team members have accepted all relevant license agreements.
However, when we try to access the entitlement request form at:
👉 https://developer.apple.com/contact/request/automatic-assessment-configuration/
We are immediately redirected to:
🚫 https://developer.apple.com/unauthorized/
This happens for all team members, including the Account Holder, so it doesn’t appear to be a role-specific permissions issue.
The app is still in the proof-of-concept stage — there’s no App Store listing or App ID yet. We’re trying to confirm entitlement eligibility before proceeding further.
Questions:
Is an App Store listing or App ID required to access this request form?
Are there any hidden prerequisites (account permissions, team roles, prior submissions, etc.) that need to be fulfilled?
Has anyone here successfully submitted this form — and if so, what steps or conditions were required?
Any guidance or shared experience would be greatly appreciated. Thanks in advance!
Topic:
Business & Education
SubTopic:
General
Tags:
Automatic Assessment Configuration
Entitlements
Assessment
Authentication Services
we develop extension "Autofill Credential Provider" function for passkey.
1.first step registe passkey
2.second step authenticate with passkey
step 1 & step 2 has finished and run success with provideCredentialWithoutUserInteraction.
But we want to prepare our interface for use to input password and select passkey what the want. however the func prepareInterfaceToProvideCredential in ASCredentialProviderViewController does call? what i missed? how can i do it?
After registe Passkey with webauthn library, i create a passkeyRegistration with follow,
let passkeyRegistration = ASPasskeyRegistrationCredential(relyingParty: serviceIdentifier, clientDataHash: clientDataHashSign, credentialID: credentialId, attestationObject: attestationObject)
and then completeRegistrationRequest like that,
extensionContext.completeRegistrationRequest(using: passkeyRegistration)
But a bad outcome occurred from user agent. NotAllowedError:The request is not allowed by the user agent or the platform in the current context.
And the return data rawID & credentialPublicKey is empty,
Topic:
Privacy & Security
SubTopic:
General
Tags:
Autofill
Authentication Services
Passkeys in iCloud Keychain
override func prepareInterface(forPasskeyRegistration registrationRequest: any ASCredentialRequest)
int this function how can i get the "challenge" from user agent, the params "challenge" need to be used in webauthn navigator.credentials.create
We are developing an app that uses Authentication Services to authenticate users. According to the documentation, this framework will open the default web browser if it supports auth session handling, and Safari otherwise. This is not entirely true, and users will be frustrated!
macOS version: Sequoia 15.5; Safari version: 18.5.
When:
The default browser is not Safari, and supports auth session handling (Google Chrome and Microsoft Edge as examples); and -
The Safari app is already running;
The auth flow will:
Present the confirmation dialog box with the default browser icon. Good!
Open a Safari window, instead of the default browser's one. Bad!
Respond with "User Cancelled" error to the app, after making the end user believe the auth was good. Very Bad!!
If the app retries the auth session, the default browser window will open as expected, and it will work as expected.
However, requiring users to authenticate twice is a very bad users experience...
This issue does not reproduce, when either:
Safari is not running at the moment of auth session start;
The default browser does not support auth session handling; or -
Safari is the default browser.
Fellow developers, be warned!
Apple engineers, feedback #18426939 is waiting for you.
Cheers!
We're integrating Sign in with Apple into our iOS app
The Apple ID login UI appears correctly on real devices, but after tapping Continue, the system immediately stops and shows code 1001.
This issue happens across multiple devices and Apple ID accounts, even with no prior login history.
We’ve confirmed the following
Sign in with Apple is enabled in both Developer Portal and Xcode Capabilities
Automatic signing and provisioning are set correctly
Device is signed into iCloud and system time is synced
Performed clean build, app reinstall, and other standard debugging steps
We suspect that the sign in handshake process may not be completing properly due to some kind of account or server-side restriction, and we’d appreciate any insights into this behavior.
Topic:
Privacy & Security
SubTopic:
Sign in with Apple
Tags:
Sign in with Apple REST API
Authentication Services
Hello,
for applications using Signin with Apple feature, it seems a particular process needs to be followed when you want to transfer the app to a new owner.
Generating transfer identifier before the transfer of ownership to identify a particular user.
There is already "email" registered for the user, personal email or relay email (doesn't matter).
Why would we need to trouble ourselves with the transfer identifier?
The documentation doesn't explain anything about the background of this. It is very weak. It doesn't explain the impacts/changes when app is transferred so that one can fully understand its impact.
Thank you.
Topic:
App Store Distribution & Marketing
SubTopic:
General
Tags:
App Store
App Store Connect
Sign in with Apple
Authentication Services
Hi Apple Developer Support,
I’m building a macOS app that acts as a default browser. I can confirm that I can set it correctly through System Settings → Default Web Browser.
The app implements ASWebAuthenticationSessionWebBrowserSessionHandling to intercept Single Sign-On (SSO) flows. To handle requests, it presents SSO pages in a WKWebView embedded in a window that this app creates and owns - this works perfectly for the initial login flow.
However, after I close my WebView window and then launch Safari or Chrome, any subsequent SSO requests open in the newly-launched browser instead of my custom browser, even though it remains selected as the default in System Settings.
I’d appreciate any insight on why the system “hands off” to Safari/Chrome in this scenario, and how I can keep my app consistently intercepting all ASWebAuthenticationSession requests.
Here are the steps that break down the issue:
Launch & confirm that the custom default browser app is the default browser in System Settings → Default Web Browser.
Trigger SSO (e.g., try to log in to Slack).
App’s WKWebView appears, and the SSO UI works end-to-end.
Close the WebView window (I have windowShouldClose callback where I cancel the pending session).
Manually launch Safari or Chrome.
Trigger SSO again. Observed behaviour: the login URL opens in Safari/Chrome.
I am using macOS 15.3.2
Hello, I'm receiving an unknown error instead of the excluded credentials error when using the "Save on another device" option for Passkey creation.
When creating the ASAuthorizationPlatformPublicKeyCredentialProvider request to pass to the ASAuthorizationController. The excludedCredentials property is used to add a list of credentials to exclude in the registration process. This is to prevent duplicate passkeys from being created if one already exists for the user.
When trying to create a duplicate passkey using the same device, the ASAuthorizationControllerDelegate method authorizationController(controller, didCompleteWithError:) is called. The error received has localized description “At least one credential matches an entry of the excludeCredentials list in the platform attached authenticator."
When trying to create a duplicate passkey using the “Save on another device” option. The delegate method is called, but the error received has code 1000 ("com.apple.AuthenticationServices.AuthorizationError" - code: 1000). Which maps to the unknown error case in ASAuthorization error type.
Topic:
Privacy & Security
SubTopic:
General
Tags:
Passkeys in iCloud Keychain
Authentication Services
Without developer mode, I was able to get Password AutoFill to work in my SwiftUI app with my local Vapor server using ngrok and adding the Associated Domains capability with the value webcredentials:....ngrok-free.app and the respective apple-app-site-association file on my local server in /.well-known/. (works on device, but not in the simulator).
However, if I use the developer mode (webcredentials:....ngrok-free.app?mode=developer) it only works halfway when running from Xcode: I get asked to save the password, but the saved passwords are not picked up, when I try to login again. Neither on device, nor in the simulator. If I remove the ?mode=developer it seems to work as expected.
Is this by design, or am I missing something?
var body: some View {
...
Section(header: Text("Email")) {
TextField("Email", text: $viewModel.credentials.username)
.textContentType(.username)
.autocapitalization(.none)
.keyboardType(.emailAddress)
}
Section(header: Text("Passwort")) {
SecureField("Passwort", text: $viewModel.credentials.password)
.textContentType(.password)
}
...
}
Topic:
Privacy & Security
SubTopic:
General
Tags:
SwiftUI
Universal Links
Authentication Services
Autofill
I have a very basic binary question around passkeys.
Assuming everything is on latest and greatest version with respect to iOS, when user starts creating a passkey in platform-authenticator i.e., iCloudKeyChain (Apple Password Manager) ,
will iCloudKeyChain create a hardware-bound passkey in secure-enclave i.e., is brand new key-pair created right inside Secure-enclave ?
OR
will the keypair be created in software i.e., software-bound-passkey ?? i.e., software-bound keypair and store the private-key locally in the device encrypted with a key that is of course created in secure-enclave.
Topic:
Privacy & Security
SubTopic:
General
Tags:
Passkeys in iCloud Keychain
Authentication Services
I'm trying to use ASWebAuthenticationSession on macOS but there is a weird crash and I have no idea what to do.
It looks like there is a main thread check in a framework code that I have no control over.
Any help would be appreciated.
Thank you in advance.
The stack of crashed thread has no symbols, even for supposedly my code in OAuthClient.authenticate.
macOS 15.4.1 (24E263)
Xcode Version 16.3 (16E140)
Thread 11: EXC_BREAKPOINT (code=1, subcode=0x10039bb04)
Thread 12 Queue : com.apple.NSXPCConnection.m-user.com.apple.SafariLaunchAgent (serial)
#0 0x0000000100b17b04 in _dispatch_assert_queue_fail ()
#1 0x0000000100b52834 in dispatch_assert_queue$V2.cold.1 ()
#2 0x0000000100b17a88 in dispatch_assert_queue ()
#3 0x000000027db5f3e8 in swift_task_isCurrentExecutorWithFlagsImpl ()
#4 0x00000001022c7754 in closure #1 in closure #1 in OAuthClient.authenticate() ()
#5 0x00000001022d0c98 in thunk for @escaping @callee_guaranteed (@in_guaranteed URL?, @guaranteed Error?) -> () ()
#6 0x00000001c7215a34 in __102-[ASWebAuthenticationSession initWithURL:callback:usingEphemeralSession:jitEnabled:completionHandler:]_block_invoke ()
#7 0x00000001c72163d0 in -[ASWebAuthenticationSession _endSessionWithCallbackURL:error:] ()
#8 0x00000001c7215fc0 in __43-[ASWebAuthenticationSession _startDryRun:]_block_invoke_2 ()
#9 0x0000000194e315f4 in __invoking___ ()
#10 0x0000000194e31484 in -[NSInvocation invoke] ()
#11 0x00000001960fd644 in __NSXPCCONNECTION_IS_CALLING_OUT_TO_REPLY_BLOCK__ ()
#12 0x00000001960fbe40 in -[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:] ()
#13 0x00000001960fb798 in __88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke_3 ()
#14 0x0000000194a6ef18 in _xpc_connection_reply_callout ()
#15 0x0000000194a6ee08 in _xpc_connection_call_reply_async ()
#16 0x0000000100b3130c in _dispatch_client_callout3_a ()
#17 0x0000000100b362f8 in _dispatch_mach_msg_async_reply_invoke ()
#18 0x0000000100b1d3a8 in _dispatch_lane_serial_drain ()
#19 0x0000000100b1e46c in _dispatch_lane_invoke ()
#20 0x0000000100b2bfbc in _dispatch_root_queue_drain_deferred_wlh ()
#21 0x0000000100b2b414 in _dispatch_workloop_worker_thread ()
#22 0x0000000100c0379c in _pthread_wqthread ()
My code:
@MainActor
func authenticate() async throws {
let authURL = api.authorizationURL(
scopes: scopes,
state: state,
redirectURI: redirectURI
)
let authorizationCodeURL: URL = try await withUnsafeThrowingContinuation { c in
let session = ASWebAuthenticationSession(url: authURL, callback: .customScheme(redirectScheme)) { url, error in
guard let url = url else {
c.resume(throwing: error ?? Error.unknownError("Failed to get authorization code"))
return
}
c.resume(returning: url)
}
session.presentationContextProvider = presentationContextProvider
session.start()
}
let authorizationCode = try codeFromAuthorizationURL(authorizationCodeURL)
(storedAccessToken, storedRefreshToken) = try await getTokens(authorizationCode: authorizationCode)
}
Here is disassembly of the crashed function.
libdispatch.dylib`_dispatch_assert_queue_fail:
0x10067fa8c <+0>: pacibsp
0x10067fa90 <+4>: sub sp, sp, #0x50
0x10067fa94 <+8>: stp x20, x19, [sp, #0x30]
0x10067fa98 <+12>: stp x29, x30, [sp, #0x40]
0x10067fa9c <+16>: add x29, sp, #0x40
0x10067faa0 <+20>: adrp x8, 71
0x10067faa4 <+24>: add x8, x8, #0x951 ; "not "
0x10067faa8 <+28>: adrp x9, 70
0x10067faac <+32>: add x9, x9, #0x16b ; ""
0x10067fab0 <+36>: stur xzr, [x29, #-0x18]
0x10067fab4 <+40>: cmp w1, #0x0
0x10067fab8 <+44>: csel x8, x9, x8, ne
0x10067fabc <+48>: ldr x10, [x0, #0x48]
0x10067fac0 <+52>: cmp x10, #0x0
0x10067fac4 <+56>: csel x9, x9, x10, eq
0x10067fac8 <+60>: stp x9, x0, [sp, #0x10]
0x10067facc <+64>: adrp x9, 71
0x10067fad0 <+68>: add x9, x9, #0x920 ; "BUG IN CLIENT OF LIBDISPATCH: Assertion failed: "
0x10067fad4 <+72>: stp x9, x8, [sp]
0x10067fad8 <+76>: adrp x1, 71
0x10067fadc <+80>: add x1, x1, #0x8eb ; "%sBlock was %sexpected to execute on queue [%s (%p)]"
0x10067fae0 <+84>: sub x0, x29, #0x18
0x10067fae4 <+88>: bl 0x1006c258c ; symbol stub for: asprintf
0x10067fae8 <+92>: ldur x19, [x29, #-0x18]
0x10067faec <+96>: str x19, [sp]
0x10067faf0 <+100>: adrp x0, 71
0x10067faf4 <+104>: add x0, x0, #0x956 ; "%s"
0x10067faf8 <+108>: bl 0x1006b7b64 ; _dispatch_log
0x10067fafc <+112>: adrp x8, 108
0x10067fb00 <+116>: str x19, [x8, #0x2a8]
-> 0x10067fb04 <+120>: brk #0x1
iOS18.1.1 macOS15.1.1 xcode16.1 Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1004 "Unable to verify webcredentials association of ********** with domain ******************. Please try again in a few seconds."
Our domain must query with VPN, so I set webcredentials:qa.ejeokvv.com?mode=developer
following:
"If you use a private web server, which is unreachable from the public internet, while developing your app, enable the alternate mode feature to bypass the CDN and connect directly to your server. To do this, add a query string to your associated domains entitlement, as shown in the following example:
:?mode=
"
but it still not working, even after I set mode=developer.
Please help!!!!
Topic:
Privacy & Security
SubTopic:
General
Tags:
Passkeys in iCloud Keychain
Authentication Services
We are using ASWebAuthenticationSession with apps on IoS to achieve SSO between apps. The IdP for authentication (OIDC) is an on-premise and trusted enterprise IdP based on one of the leading products in the market. Our problem is that the user is prompted for every login (and logouts) with a consent dialogue box:
“AppName” wants to use “internal domain-name” to Sign In
This allows the app and website to share information about you.
Cancel Continue”
I have read in various places that Apple has a concept of “Trusted domains” where you can put an “Apple certified” static web-page on the IdP. This page needs to contain specific metadata that iOS can verify. Once a user logs in successfully a few times, and if the IdP is verified as trusted, subsequent logins would not prompt the consent screen.
Question: I struggle to find Apple documentation on how to go about a process that ends with this “Apple certified web-page” on our IdP”. Anyone who has experience with this process, or who can point me in some direction to find related documentation?
Since release of 18.4. prepareInterfaceToProvideCredential .oneTimeCode case is not called and instead prepareInterfaceForUserChoosingTextToInsert() is called. That is the wrong delegate for this case and it causes confusion for the users.
Also, some TOTP fields are recognised however, the key icon button is not presented above the keyboard next to TOTP suggestions.
I've also tested 18.5 and it has the same issue.
provideOneTimeCodeWithoutUserInteraction works just fine.
Hi team,
We are experiencing an issue where some users in China are unable to create passkeys due to authentication errors.
This is the UI flows
The method we use to prompt users is passkey creation. Technically, this is implemented using Apple’s AuthenticationServices framework. We create an instance of ASAuthorizationController and conform to ASAuthorizationControllerDelegate to handle the results of the authentication attempt.
In failure cases, we receive ASAuthorizationError.failed (code 1004), along with some additional details describing the nature of the failure.
However, we are currently unable to determine the exact root cause of this issue or how to resolve it. At this point, we can only make assumptions based on the limited error information provided.
Our current hypothesis is that due to network restrictions, Apple may be unable to reach the .well-known endpoint where we host the associated domain file. Alternatively, even if the file is successfully loaded and cached to Apple’s CDN, the system in China may not be able to reach the CDN itself.
We would greatly appreciate it if you could help us understand what might be causing this problem and guide us on how we can resolve it effectively.
Thanks,
Hung
Topic:
Privacy & Security
SubTopic:
General
Tags:
Passkeys in iCloud Keychain
Authentication Services
Hi, we were recently approved for the com.apple.developer.web-browser.public-key-credential entitlement and have added it to our app. It initially worked as expected for a couple of days, but then it stopped working. We're now seeing the same error as before adding the entitlement:
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)"
Do you have any insights into what might be causing this issue?
Thank you!