Search results for

ASWebAuthenticationSession cookie

1,295 results found

Post

Replies

Boosts

Views

Activity

ASWebAuthenticationSession password autofill iOS 18.5 broken
I have been implementing an sdk for authenticating a user. I have noticed that on iOS 18.5, whether using SFSafariViewController, or the sdk (built on ASWebAuthenticationSession), password autofill does not work. I have confirmed it works on a different device running iOS 18.0.1. Are there any work arounds for this at this time? Specifically for ASWebAuthenticationSession?
2
0
166
Jul ’25
How do I use FSBlockDeviceResource's metadataRead method?
I reported this as a bug (FB18614667), but also wanted to ask here in case this is actually just me doing something wrong, or maybe I'm misunderstanding the entire use case of metadataRead. (My understanding is that metadataRead is basically read but it checks a cache that the kernel manages before trying to read the physical resource, and in the case of a cache miss it would just go to the physical resource and then add the bytes to the cache. Is that right?) I’m encountering an issue in an FSKit file system extension where (for example) read(into: buf, startingAt: 0, length: Int(physicalBlockSize)) works, but metadataRead(into: buf, startingAt: 0, length: Int(physicalBlockSize)) throws an EIO error (Input/output error) no matter what I do. (Note: physicalBlockSize is 512 in this example.) The documentation (https://developer.apple.com/documentation/fskit/fsblockdeviceresource/metadataread(into:startingat:length:)) indicates that the restrictions on metadataRead are that the operations must be sector-address
4
0
232
Jul ’25
clearing Safari/iOS cache?
Is there a way to clear iOS Safari's cache? Or disabling it?When debugging a website on iOS, running into a situation where content is being cached despite repeated reloads. Going to Settings on the device to clear the cache is, apart from being tedious, is a nuclear option as it also clears everything else including cookies. I still use my iPhone for regular surfing…
9
0
6.8k
Oct ’22
WKWebView requires authentication
I use WKWebView to display a webpage that requires authentication through an authentication provider. This works as expected, but when I close and reopen the app, I have to reauthenticate. However, if I open the same page in Safari, I only have to authenticate once. If I close Safari and reopen it, the page displays without prompting me to authenticate again. I see some cookies stored in httpCookieStore, so I assume that storing cookies works. Does anyone have an idea why authentication is not persistent between app launches? Thanks in advance. Best regards, Marc
Topic: Safari & Web SubTopic: General Tags:
3
0
80
Jul ’25
Apps and Books for Organizations API – Reliability Issues, Feature Request, and Rate Limit Clarification
Hi Apple team and community, We’re currently integrating with the Apps and Books for Organizations API as part of our device management solution and would like to highlight a few critical points we've encountered — including a reliability issue, an enhancement suggestion, and a request for clarification on API rate limits. 1. Issue: Intermittent 403 Errors with stoken-authenticated-apps Endpoint We are encountering intermittent 403 Forbidden responses from the stoken-authenticated-apps endpoint. Approximately 30–35% of the requests fail with a 403 status code. These failures are inconsistent — the same request (using the same Content Token and Storefront) may succeed upon retry. All requests are properly authenticated and include the required Cookie and other headers as specified in the API documentation. This issue is impacting our ability to reliably fetch app metadata at scale, particularly in workflows. We’d like to know: Is this a known issue? Could it be due to a rate limit or token misconfigur
1
0
1.1k
Jul ’25
Reply to WKWebView requires authentication
Which kind of authentication is this? There exist different ways to authenticate: the most common ones are web forms (which use cookies to preserve the login state for example) and HTTP authentication (which would use the URLCredentialStorage so preserve credentials). Cookies are usually stored automatically by the WKWebView, but depending of the configuration, it might not do this. For example if the websiteDataStorage property of the WKWebViewConfiguration is configured to use a non-persistent storage, then cookies won't be stored (for example this is the case when using private tabs in Safari). Also, since iOS 17 it is possible to create your own WKWebsiteDataStore objects and don't need to rely on the shared one or the non-persistent one that is provided by the iOS. If you create your own, then you need to make sure you use the correct identifiers, because the identifiers define which of the storages is actually used. When using a random identifier (like a uuid), you would creat
Topic: Safari & Web SubTopic: General Tags:
Jun ’25
Could not delete cookies on IOS18
Hello, I have encountered an issue with an iPhone 15PM with iOS 18.5. The NSHTTPCookieStorage failed to clear cookies, after clearing them, I was still able to retrieve them. However, on the same system NSHTTPCookie *cookie; NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; for (cookie in [storage cookies]) { [storage deleteCookie:cookie]; } NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:[[self url] absoluteURL]]; // still able to get cookies,why???
1
0
77
Jun ’25
Reply to Files Provider Extension Domain:Process mapping
I am curious why you need to rely on the domain:process mapping though, if you don't mind to share. Thanks for the response! We don't need to rely on domain:process mapping, but I'm trying to understand what we can rely on. For example, each domain is a separate account - things like cookies, caches, etc are probably not to be shared across accounts. I'm looking at the header for NSFileProviderDomain right now, and I see this comment: On the extension side, a separate instance of NSFileProviderExtension will be created for each @c NSFileProviderDomain registered. In that case, the @c NSFileProviderExtension.domain properties will indicate which domain the NSFileProviderExtension belongs to (or nil if none). This is what led me to believe that all of the calls for a particular domain would be routed to a single process. I'm finding that not to be the case - calls for any domain can come to any Files Extension process, which would seem to contradict that comment as I understand it. Is that as expected?
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’25
Does "Locked and hidden apps" feature of iOS 18 support deep link?
Our app includes showing external web service with WebView or Safari and returning to the app with custom URL scheme or universal link. When we set Hide and Require Face ID feature which was available on iOS 18, neither custom URL scheme nor universal link activated the app. If we only set Require Face ID, the deep link worked properly. Here is what we've tried: Define custom URL scheme or universal link in the app https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app https://developer.apple.com/documentation/xcode/supporting-universal-links-in-your-app Implement external web service with one of the following frameworks ASWebAuthenticationSession https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession/ SFSafariViewController https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller Safari WKWebView https://developer.apple.com/documentation/webkit/wkwebview On iOS 18 device, install the app and set H
3
0
1.7k
Jun ’25
Safari 16.4 seems to lose session cookies on asset requests or javascript fetches.
On iPads after updating to iPadOS 16.4, Safari often looses the session cookie provided by PlayFramework: When the browser requests assets (js scripts) or when additional data is fetched by JavaScript, the session cookie is not included in the request. These secondary requests will redirect through our IAM because no session cookie is present. The IAM redirects back to the original domain with a payload so that the login session can be resumed. A new Set-Cookie header is sent in the response with the new session cookie. This causes the framework to issue a new CSRF token (that is part of the session cookie) which is different from the old one that was already rendered into a hidden form input. The browser stores this new token and includes it when it POSTs the form. The token in the body of the request is now different from the one in the cookies, causing the CSRF check to fail. We have tried different devices (Android, Windows, MacBook, and iPads
20
0
14k
Jun ’25
How to delete cookies on IOS18
Hello, I have encountered an issue with an iPhone 15PM with iOS 18.5. The NSHTTPCookieStorage failed to clear cookies, but even after clearing them, I was still able to retrieve them. However, on the same system It is normal on iPhone 14PM. I would like to know the specific reason and whether there are any adaptation related issues. Following code: NSHTTPCookie *cookie; NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; for (cookie in [storage cookies]) { [storage deleteCookie:cookie]; }
1
0
129
May ’25
On iOS 18.0, when setting a cookie with SameSite=None; Secure, the attribute does not take effect and is automatically converted to SameSite=Lax.
On iPhone 16 running iOS 18.0(Xcode 16.2), cookies configured with SameSite=None; Secure fail to apply correctly—iOS forcibly converts the attribute to SameSite=Lax. As a result, cross-site requests from H5 pages within our app cannot carry the required cookies, causing failures. Can anyone help me on this? Thanks in advance.
1
0
157
May ’25
ASWebAuthenticationSession crash after window closes on macOS
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 _
1
0
126
May ’25
When using WKWebView in iOS 18.0 (Xcode 16.2) to open a local H5 page, the request for server resources cannot carry cookies.
In our project, we download H5 resources to the local device and then open the H5 pages through WKWebView(-loadFileURL:allowingReadAccessToURL:). When the H5 pages request server resources, cookies are required. Before opening the H5 page, we set the required cookies in the WKHTTPCookieStore using the setCookie method. Additionally, we set the allowFileAccessFromFileURLs and allowUniversalAccessFromFileURLs properties for the WebView. On other mobile phones, the cookies can be carried normally. However, on mobile phones running the iOS 18.0 system, the cookies cannot be carried. Moreover, this problem only emerged after we upgraded Xcode to version 16.2. We've also tried injecting cookies via JavaScript, but it didn't work(document.cookie = xx=${xx}; path=/; expires=weekday, xx jan xxxx xx:xx:xx GMT; Domain=example.com; Secure; SameSite=None ;). Can anyone help me on this? Thanks in advance.
2
0
198
May ’25