Search results for

ASWebAuthenticationSession cookie

1,299 results found

Post

Replies

Boosts

Views

Activity

Reply to Different SSO behavior for ASWebAuthenticationSession in iOS 14
Hello, Thanks for your response. The upgrade to iOS 14.5 fixed the issue only for some users. Not for all of them. I specified the user-agent just to show you that the user who still experience this issue has upgraded to iOS 14.5. Here are the details regarding the circumstances in which the problem occurs: An in-app browser tab is opened (ASWebAuthenticationSession) to let the user login to our application (OIDC flow) The user authenticates and the authentication server redirects him/her (with a 302) to the authorization endpoint with a set-cookie header containing the session cookies (set-cookie: session=xxxxxxxxxx; path=/; expires=Thu, 20 June 2021 20:25:45 GMT; samesite=none; secure; httponly) When calling the authorization endpoint, after redirection, the cookie is not sent to the authentication server by Safari. The cookie header is empty. What is strange is that this only affects some iOS users on different versions including 14.5 ... Regards,
Topic: Privacy & Security SubTopic: General Tags:
Jun ’21
Doesn't WKAppBoundDomains become by default in iOS15?
WKAppBoundDomains was introduced in iOS14. That is not allow evaluate Javascript, touch cookie storage or more without selected domains. I know this is for privacy and security. When it was introduced, I thought it will become default behavior in WKWebView. Doesn't WKAppBoundDomains become by default in iOS15? if not, is there a plan to enable WKAppBoundDomains for all WKWebViews?
0
0
944
Jun ’21
Is ATT required for launching out to web?
My app was recently rejected because of non-compliance with App Tracking transparency because, while I do not use any kind of tracking in my app whatsoever, I do link out to the website that my company owns, and on that site, there are cookies. I obviously cannot control what the website does as I'm not on that team. Is there any way to launch a website that uses cookies without requiring the ATT popup? I've heard that SFSafariViewController is sufficient but WKWebview is not. Is this true? Is there something I can do to launch to the website (for things like FAQs) but avoid requiring the ATT popup?
8
0
12k
Jun ’21
Sometimes cannot delete WKWebsiteDatastore's cookies which have specific domains
I’ve written code that deletes WKWebView’s cookies that have specific domains. I use WKProcessPool to share cookies with other WKWebViews, so resetting it too. It basically works. But sometimes It fails once in fifty to a hundred times. A few cookies are still left even though the cookies’ domains match target domains. Any Advice? extension WKWebsiteDataStore { func deleteCookies(with domains: [String]) { // reset processpool InAppDataManager.resetWKProcessPool() //delete cookies with specific domains after fetching all cookies self.fetchDataRecords(ofTypes: WKWebsiteDataStore.allWebsiteDataTypes()) { [unowned self] records in self.httpCookieStore.getAllCookies() {(cookies) in cookies .filter { cookie in guard let _ = domains.first(where: { $0 == cookie.domain }) else { return false } return true } .forEach { cookie in self.httpCookieStore.delete(cookie) } } }
Topic: Safari & Web SubTopic: General Tags:
0
0
610
Jun ’21
Reply to ASWebAuthenticationSession's callbackURLScheme crash
ASWebAuthenticationSession does not require any modification in your Info.plist. This exception happens because the value that was passed to callbackURLScheme contained either a : or / character. In most cases, this means you passed something like myscheme://, which is not valid. The correct value to pass in this case is just myscheme (no trailing ://).
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’21
Reply to Different SSO behavior for ASWebAuthenticationSession in iOS 14
The upgrade to iOS 14.5 fixed Great news! For example, this issue persists with a user with this user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Mobile/15E148 Safari/604.1. From the logs I can see that, with ASWebAuthenticationSession, cookies that are correctly set by our server in set-cookie header but are not sent by Safari in the following calls. I precise that we only use first-party cookies. I'm confused what the User-Agent string has to do with the issue persisting? Are you able to provide any more information about the non-working case? Have these users not updated to iOS 14.5 yet? Matt Eaton DTS Engineering, CoreOS meaton3@apple.com
Topic: Privacy & Security SubTopic: General Tags:
Jun ’21
Cookie storages HTTPCookieStorage & WKHTTPCookieStore sync issue
Hello, community We have an issue with synchronizing the cookies between storages HTTPCookieStorage and WKHTTPCookieStore. We use REST API requests and WKWebView as part of the application. Customer environment directly linked to cookies, so WKWebView and URLRequests both can change cookies and we need to check/sync for actual cookies in both storages after completing requests. As we know, by default from the box there is sync from HTTPCookieStorage to WKHTTPCookiesStorage, and there is no sync from WKHTTPCookieStorage to HTTPCookieStorage. But, as we know from the forum questions, sync from the box not working from ios 11.3. We created a custom CookieSync manager, which manually synchronizes cookies between storages after each request (API and WebView), with storage priority. For the manager, we use the same WKWebSiteDataStore, as for each WKWebView object. From our debug and testing processes results, we know that storages don't synchronize correctly. Maybe this
0
0
981
May ’21
Reply to Different SSO behavior for ASWebAuthenticationSession in iOS 14
Hello, Do you have some feedback regarding this fix? The upgrade to iOS 14.5 fixed the issue for some of our users but not for all of them. For example, this issue persists with a user with this user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Mobile/15E148 Safari/604.1. From the logs I can see that, with ASWebAuthenticationSession, cookies that are correctly set by our server in set-cookie header but are not sent by Safari in the following calls. I precise that we only use first-party cookies. This concerns a very small number of users but they are completely blocked with no other solution than to reset their iPhone or to buy a new one. Regards,
Topic: Privacy & Security SubTopic: General Tags:
May ’21
Sign in with Apple + Face/Touch ID + NodeJS/PassportJS
Hey there, I'm currently developing an iOS app that communicates to a NodeJS server as a backend. The server uses passport.js as an authentication middleware to allow users to login and authenticate requests to the server. I want to implement Sign in with Apple functionality to allow users to sign in with their existing Apple ID and I found a few passport plugins to support this functionality. My question is, is it possible to integrate Touch/Face ID with this login/authentication flow? The desired outcome I'm looking for is:user presses Sign in with Apple button --> iOS app prompts them with Touch/FaceID modal --> on success user account is created if it doesn't exist and/or user is logged in and iOS client receives a token or cookie for subsequent requests (the logic for this would be handled server side via passport) The closest I've come to the desired outcome is the user presses Sign in with Apple button which opens a web view containing the Apple's sign in web page which then prompts them
0
0
2k
May ’21
ASWebAuthenticationSession doesn't share localStorage and cookies with Safari
I'm testing ASWebAuthenticationSession with a site that has a counter increased each time the page loads and saved to localStorage to make sure ASWebAuthenticationSession share data with the site. The result was that ASWebAuthenticationSession in app and Safari don't share localStorage, even the app presents a pop-up to allow sharing data between the app and localhost (the site is localhost) I then test with cookie (expires in 1 day), it didn't get share, either. This is opposite to the behavior documented. Device: iPhone 11 Simulator, iOS 14.5 IDE: XCode 12.5 on macOS Big Sur - Macbook Pro M1
0
0
978
May ’21
Safari 14 - Cookies are not sent for XHR requests on a subdomain
It seems to be a question that comes up often in different ways, but despite several hours of research I still haven't found a solution. I currently face an issue in Safari 14 on MacOS BigSur where cookies are never sent by Safari on XmlHttpRequests to an api on the same root domain. Indeed, i'm working on an Angular SPA where the client app is locally hosted at https://myapp.local and for tests purpose I have an api running locally on https://api.myapp.local. For some requests, we need to attach 2 cookies that are originally set by the API. I am able to see the said cookies in the API responses and in the storage section of Safari's DevTools, however they are never sent back to the server for subsequent XHR requests. (XHR with credentials) I did try different cookie's attributes but none of my tries were successful : sameSite=None, domain=myapp.local, Secure, httpOnly sameSite=Lax, domain=myapp.local, Secure, httpOnly The only way I found to get around the problem was to d
3
0
5.1k
May ’21
Apple sign-in troubles with use case
Hello, I'm currently struggling to figure out how I can make Apple sign in work with my app configuration. Maybe I'm just dumb, but I really can't figure out what I need to do to make it work. So I have a Next.js app setup server-side rendering my React frontend, and on a separate server, I have a Node.js (specifically Adonis.js) backend/api which I use to handle auth and sessions. I have both Facebook and Google OAuth2 logins setup and working perfectly, where I'm receiving a code as a query param in my callback url to my frontend, which the client then sends that code to my backend/api, which uses that code with the provider (FB or Google) to get their email, name, and any other data I could use to prevent the user from having to add later, and either create the user and log them in, or just log them in if they already exist using cookies. I don't need any sort of write access to their third party account, or anything more than reading their name and email so they don't have to enter it themselves,
2
0
3.1k
May ’21