Is there a way to pass/read cookies from SFSafariViewController to my application?
Search results for
ASWebAuthenticationSession cookie
1,295 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
It all started an hour ago when I tried to download the Network Link Conditioner (I need to test the macOS application I'm developing with a slower network connection). I went to XCode > Open Developer Tool > More Developer Tool. It opens a Sing In page for apple developer. When I sign in with my account, it just refreshes the page and asks me to Sign In all over, stuck in a loop. Otherwise, I'm able to Sign In to all the other parts of the developer website, I have an active membership, all license agreements are up to date. Apple's status site shows everything operational. What I tried: Clearing cookies & cache Different browsers (including Safari) Updating & restarting everything Navigating from https://developer.apple.com/download/ to More tab on the website instead of going through XCode Signing in with a passkey instead of a password Tried using a VPN Going to the Developer Support page (https://developer.apple.com/support/) and trying to press Get Started to reach out to support
Failed to access iCloud data I'm also experiencing this issue, after turning on advanced data protection I'm almost always unable to access the containers with the same error show in the OP's screenshot. Attempted Resolution signing out and signing back in does not resolve additionally turning Advanced Data Protection on or off does not resolve. attempts on multiple devices (mac, iphone) and browsers (firefox, chrome, safari) do not resolve clearing browser cache and cookies does not resolve VERY occasionally (like literally once a week,) I am able to sign in following normal sign on procedures and view the private and shared containers of a production or development environment. Its really frustrating! What's going wrong Here's a screenshot of the browser's console on a failed attempt to view the private container, not sure if helpful:
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags:
Hello, I'm having an issue where my app is in TestFlight, and some of my testers are reporting that FairPlay protected videos are not playing back in iOS 17. It's been working fine in iOS 16 (my app's initial target). I can see from the debug logs that for an online stream request - contentKeySession(_ session: AVContentKeySession, didProvide keyRequest: AVContentKeyRequest) is never called. Whereas, a download for offline playback request, the function is called. I've used much of the sample code in HLS Catalog With FPS as part of the FPS developer package. All of my m3u8 files are version 5 and contain encryption instructions like below: #EXT-X-KEY:METHOD=SAMPLE-AES,URI=skd://some-uuid,KEYFORMAT=com.apple.streamingkeydelivery,KEYFORMATVERSIONS=1 Here's a short excerpt of the code being run: let values = HTTPCookie.requestHeaderFields(with: cookies) let cookieOptions = [AVURLAssetHTTPHeaderFieldsKey: values] assetUrl = del(assetUrl) clip!.assetUrl = AVURLAsset(url: URL(string: assetUrl)!, options: c
I'm trying to find out if it's safe to use cookies for authentication on my hybrid iOS app. Cookies get set by this code snippet (from the capacitor project). public func setCookie(_ url: URL, _ key: String, _ value: String, _ expires: String?, _ path: String?) { let jar = HTTPCookieStorage.shared let field = [Set-Cookie: (key)=(value); expires=(expires ?? ); path=(path ?? /)] let cookies = HTTPCookie.cookies(withResponseHeaderFields: field, for: url) jar.setCookies(cookies, for: url, mainDocumentURL: nil) syncCookiesToWebView() } Is there any mechanism in iOS which will remove cookies from the HTTPCookieStorage before the cookie expires? Or is there some kind of max life time?
We are relying on ASWebAuthenticationSession to do web authentication. Since the API doesn't support POST requests directly we have to generate local file in ~/Library/Application Support//WebAuth.html containing the POST and use initial URL as file:///Users//Library/Application%20Support//WebAuth.html Problem is that Safari sometimes pops a dialog Confirm the file to load and sometimes it doesn't. This doesn't depend on Full Disk access TCC. Does anybody know a way to prevent this from happening? MDM option or something? Also styling of the popup is a rather poor UI choice - looks very confusing and like the user may choose another file to load. Chrome f.e. doesn't do such popups. I already have FB13340210 for this.
Hi, Getting reports from a client that they are being asked to re-login to their PWA (saved to their home screen) whenever they turn off their iPads for periods of 1-2hrs and then turn it back on again. Just noting, this isn't related to the 7 day cap on cookie data in webkit as we've already addressed this. I've tested just turning it off for a few minutes on a standard iPhone with iOS17 but don't experience the same issue. Does anyone know if it is part of iOS's device restart to clear PWA cookies etc. if the device has been off for a long time? The only other avenue I can think of is that the client's devices may have some MDM setting for this. Thanks in advance.
well, that lasted two minutes. firefox udate fixed the problem, then i closed firefox to clear cache & cookies (from this site) and reopened. now it’s junk again. thanks, apple! and thanks for all your help here! it's amazing, the number of helpful responses!
Topic:
App & System Services
SubTopic:
Core OS
Tags:
well, that lasted two minutes. closed firefox to clear cache & cookies and reopened. now it’s junk again. thanks, apple!
Topic:
App & System Services
SubTopic:
Core OS
Tags:
We have the same issue, and it's very annoying. We rely on Universal Links for login (for secure callback from ASWebAuthenticationSession to the app), so App Review definitely stumble upon that issue during review. We never get any user tickets about it and it never occurs during our own testing, but it happens pretty often during App Review. So far, luckily, we have explained the situation to App Review, they try again, and it works. But it feels very fragile; there must be something with the App Review install process which is not reliably registering Universal Links.
Topic:
Code Signing
SubTopic:
Entitlements
Tags:
iPhone 14 Pro + iOS 17.0.2. Cookies are not getting added to Web Requests On the above device model, cookies stored in WKWebCookieStore are not automatically added to web view requests. This bug is happening only after upgrading the device to iOS 17.0.2 on my iPhone 14 pro. Other devices with same OS version are not having this issues. Anyone has faced this issue and possible solve for this?
@garrett-davidson Sure thing. I do think some of our users will be confused, but that is also partly due to the login provider my company uses and decisions I don't have much control over. When users are presented this choice, I expect them to choose app only, and I don't blame them. The problem we'll face is that a remember my device setting for MFA is cookie-based, and users will be unintentionally disabling that. So we'll either have to communicate that to them pro actively or handle it on the support side. When I first saw this, I was actually excited because I thought it was going to help me make the case for dropping our login provider in favor of something more user friendly. But that's realistically a bit of a stretch and I expect many in a similar situation will just be stuck supporting it. In terms of improving this feature, one pain point with these SSO type logins is that you also get the prompt asking for permission to sign in when a user signs out, if you actually want to clear out the
Topic:
App & System Services
SubTopic:
Core OS
Tags:
In iOS 17 beta 5, the alert controller that pops up when sharing cookies with Safari was different than it was in iOS 16. I'm not sure how many betas this was in, but it said: Do you want to also sign in to in Safari? This allows and in Safari to share information about you such as your account. will work without this. Cancel Sign in to & Safari Only Sign in to In the official release of iOS 17, the alert is back to having just Cancel and Continue and the text it had previously: Wants to Use to Sign In This allows the app and website to share information about you. Question is, was this a fluke in beta? Is the ability to for users to disable Safari cookies something that is coming back? Is it a setting? I can't seem to find any information about this at all. It was concerning for us in beta, because it seemed like it was going to be a potential source of login issues, but now I'm not sure what to make of it. Thank you!
Using WebAuthn (i.e. security keys or passkeys) is only supported for first-party uses in WKWebView. For third-party sign in (e.g. Sign in with Apple), you'll need to use ASWebAuthenticationSession.
Topic:
Safari & Web
SubTopic:
General
Tags:
Hi. I am facing weird issue. I can access developer.apple.com forum in incognito mode on Chrome and on my spam google account. But when I try to access same url with my main Google Account I get Oups! An unexpected error has occured. message. Css does not load. A couple of requests fail will 422 status. I tried to remove all the cookies. I turned off all extensions. I have the latest Chrome installed. I tried to restart browser. I am on Macbook Pro M1 Pro on Ventura. This issue exists for over a year now but I had enough of it and I am wondering if there is something I can do to fix this.