Search results for

ASWebAuthenticationSession cookie

1,295 results found

Post

Replies

Boosts

Views

Activity

How to make ASWebAuthenticationSession working with other browsers
We use ASWebAuthenticationSession in our app to perform SAML auth on iOS devices. It works fine with Safari. However, if we config other browsers, such as Chrome, as a default browser on iOS device, ASWebAuthenticationSession still load Safari in embedded window and auth cookies is only stored in Safari. Can ASWebAuthenticationSession work with default browser on iOS similar as it works on MacOS? Thanks, Ying
1
0
827
Aug ’24
Reply to Get cookies - Safari web extension iOS 18
Confirmed on iOS 18.0 (22A55346a) Thi code executed in the background scope (cookie permission is enabled in the manifest): > await chrome.cookies.getAll({url: 'https://www.apple.com'}) < [] Meantime, I've executed a command in the content scope on https://www.apple.com: > document.cookie.split(/;s?/) < 0 as_dc=ucp6 1 mbox=session#b6e888e3d25a447494058... 2 s_vi=[CS]v1|33670C16F9B818C4-600015E... 3 at_check=true 4 geo=US 5 mk_epub=%7B%22btuid%22%3A%22mn038... 6 s_cc=true 7 s_fid=68F59610D97CF34A-21EA35105ABE...
Topic: Safari & Web SubTopic: General Tags:
Aug ’24
Can't add new build to External Test group, getting 404 error
Hello, I am trying to add a new build of my project which is working on my internal testing group, to my external testing group. I tried to add the new build, and the app was approved for Beta. The new build did not appear in my external testing group. I tried to add it again, but I am now getting this response from the App Store Connect system: errors : [ { id : 33d32e57-100f-4a9f-a2cb-9b0b41d29502, status : 404, code : NOT_FOUND, title : The specified resource does not exist, detail : There is no resource of type 'builds' with id 'a7a3e66a-f120-4ff8-9544-6754f9515458' } ] } Is the App Store Connect system down, or is something wrong with my account? I've tried clearing the browser cache/cookies/etc, and restarting my computer, but the problem is persisting.
3
0
764
Aug ’24
Issue with Authentication Sharing Between Native App and WebView
I’m working on an iOS app using WKWebView, and I’ve implemented the following authentication flow: Sign-In Process: The sign-in process is handled natively. Access Token Storage: Once the user is signed in, the access token is stored within the app. WebView Cookie Setting: When a webview is opened, the app sets the access token in the webview’s cookies. Token Validation: The web server validates the access token from the cookie. Problem: I’m encountering an issue where the authentication state between the native app and the webview doesn’t always synchronize correctly. Specifically: Sign-In Issue: If a user signs in while the webview is already open, the native app attempts to set the cookie in the webview. However, there are cases where the cookie isn’t set properly, and the server fails to retrieve the access token, similar to when a user is signed out. Sign-Out Issue: When a user signs out, the native app deletes the cookie. Although the app reports suc
0
0
605
Aug ’24
Unable to manually or programmatically create cookie with SameSite=None on iPadOS 18 beta
Unable to create a cookie using WebKit API or manually create a cookie in Safari with SameSite=None on a device using iPadOS 18 beta. In Safari, the None option is still in the drop down as a selection for SameSite which leads me to believe this is a bug. Is this going to be fixed in the release version of iOS 18?
2
0
1.1k
Aug ’24
SFSafariViewController lifecycle delegate
Hello, Is it possible to use a delegate or other approach to detect lifecycle events like form submissions / navigation events from the SFSafariViewController from the application that creates the Safari instance? The use case is a centralised session keep-alive requirement to extend the ttl on tokens for multiple third-party clients that use Single-Sign-On via browser cookies for authentication.
Topic: Safari & Web SubTopic: General
1
0
340
Aug ’24
Cookies file path for WKWebView
Hi, I need to automate for testing/verification the cookies that were saved in my WKWebView application. I have used Activity Monitor to try and find the cookies file path but do not see it. I can see my local storage files saved to /Users/test/Library/WebKit/com.foo.ui/WebsiteData/Default/random_uuid/LocalStorage/localstorage.sqlite3 so I looked for a cookies file around there and found nothing. Where are cookies saved to on disk?
Topic: Safari & Web SubTopic: General
0
0
340
Aug ’24
Reply to Authenticate Safari Extension with Web Application
Ok I managed to solve the problem :OO Leaving the answer to someone that may have same problem in the future :D In my manifest file I had to change background.service_worker to background.scripts. Apparently service_worker runs on the separate thread and has limited browser context hence no access to the cookies If you use background.scripts instead it will make extension generate persistent background page that has a possibility to pickup the cookies :D Everything works out of the box now :D
Topic: Safari & Web SubTopic: General Tags:
Aug ’24
WKWebView adding cookie does not work with iOS 18 beta
If you create a cookie and add to the WKWebViewConfiguration the completionHandler returns 'Cookies synced' suggesting cookie was added with success. However, upon inspection of app in Safari the cookie is not there. This is broken in iOS 18 beta and works in previous versions without issue. Did Apple change the WKWebView API and break this feature? code snippet: NSDictionary* settings = self.commandDelegate.settings; WKWebViewConfiguration* configuration = [self createConfigurationFromSettings:settings]; configuration.userContentController = userContentController; NSMutableDictionary *cookieProperties = [NSMutableDictionary dictionary]; [cookieProperties setObject:@foo forKey:NSHTTPCookieName]; [cookieProperties setObject:@bar forKey:NSHTTPCookieValue]; [cookieProperties setObject:@mydomain.com forKey:NSHTTPCookieDomain]; [cookieProperties setObject:@mydomain.com forKey:NSHTTPCookieOriginURL]; [cookieProperties setObject:@/ forKey:NSHTTPCookiePath]; NSHTTPCookie *cookie
9
0
3.8k
Aug ’24
Reply to Authenticate Safari Extension with Web Application
Thanks for response. This will mean that I have to start develop in swift which I am trying to avoid. I found other very similar extension that seems to work the same way. The difference that I see between ours is that when I enter Develop > Web Extension Background Content: 3rd Party Extension I can see generated_background_page.html in the Sources Tab that loads the background script. I can also see all the devtools tabs like on any other website. In Networking tab can see all the requests made. Interesting thin is that if I make the fetch request from the Console of this background script to our service... the cookie gets attached automatically and I am able to use the api. My Extension While when I enter background script of my extension I can see only three dev tools tabs: Console, Network and Sources. In Sources I have only service-worker.js file and none of html files. On the Network tab I can't see any requests send for example when I open extension popup yet.. in Console I can see all the
Topic: Safari & Web SubTopic: General Tags:
Aug ’24
Can't see response body in the web inspect.
When we activate the developer options and right-click to select Inspect, then navigate to the Network tab, we can view the request entries. However, upon clicking on an entry, I can see the headers, cookies, and other details, but one crucial aspect is absent: the request and response data. This seems like a fundamental feature—why is it missing? 🤔
0
0
875
Aug ’24