Search results for

ASWebAuthenticationSession cookie

1,295 results found

Post

Replies

Boosts

Views

Activity

Reply to WKWebView Challenges while authenticating PIV Certificates
Hi. Thanks for your prompt reply. I am also not concerned about Cordova. I have this new implementation that I need to work on regarding PIV related authentication in WKWebView. Please let me explain the scenario below. A PIV (Personal Identity Verification) card converts to a digital certificate by essentially extracting the cryptographic key pair stored on the card and embedding it into a digital certificate file, which can then be used for authentication and digital signing purposes. I am intending to use it in my iOS app which uses WKWebView and has Okta SSO for SAML Authentication. I am aware that this PIV digital certificate will be stored in iOS device through MDM. There are few questions that I have related to this implementation: As you mentioned that these certificates does not get stored in the form of .p12, then please let me know how and which format do they get stored. How can I use these digital certificates in my app when the SSO asks for authentication through PIV. For POC purposes, I have ad
Topic: Safari & Web SubTopic: General Tags:
Nov ’24
Reply to safari-not-sending-cookie-even-after-setting-samesite-none-secure
We have already given the authentication in all the API services. And we are getting the valid cookie in browser. But cookie is not storing in the header request while calling the API using the JavaScript method. We are not using the swift and objective code in my application. Kindly suggest how we can set the cookie in header request using the JavaScript in the Cordova framework?
Topic: Safari & Web SubTopic: General Tags:
Nov ’24
Reply to HTTPCookieProperty's "secure" property seems broken
I disagree with your assessment that this is kind of how HTTP cookies work. The RFC you link is for how a server needs to interpret a cookie sent to it not how a client should implement creation of one. I think others would likely agree that this is a wart and that setting secure to false would result in the correct behavior of not setting the secure attribute on the cookie. It also make coding something simple like .secure: environment().isSecure() into another if statement that every person coming after will question why it's done this way and then eventually figure it out. The only reason I agree that this likely needs to stay the same is it's a pretty big breaking change at this point and many apps are likely working by accident as setting .secure to anything other than true makes no sense. Anyway... wasted more hours than I would like to admit on this as I was also adding a new networking library as well as adding cookies to the app so I spent a lot of time debugging t
Nov ’24
WKWebView Authorization Challenge fails to refresh
I have a url that I want to stream, the stream is protected by basic auth. I am using URLAuthenticationChallenge (wkwebview navigation delegate function) method to provide my credentials. the credential changes with every stream url. The issue I am facing is that URLAuthenticationChallenge is never called upon refresh or on new URL request until the app is killed and opened again. I have tried: clearing cooking setting cache to ignore opening an another blank url using child view approach setting wkwebview instance to nil I always end up with 401 in decidePolicy (wkwebview delegate functions) on subsequent refresh call. Upon inspecting I see that it is using my previous used credentials and never calling challenge to update. *Backend has a no-cache policy in its header. **I am using http resource, the aim is to have streaming service on iOS. class ViewController: UIViewController, WKNavigationDelegate, WKUIDelegate { @IBOutlet weak var wkWebView: WKWebView! override func viewDidLoad() { super.viewDidLoad() le
Topic: Safari & Web SubTopic: General Tags:
1
0
618
Nov ’24
Reply to Its time for SwiftUI on the web! (WASM, WEBGL)
I'm a freelancer in iOS development but every now and then I get a request to make small websites for distant relatives or friends or acquaintances of them. I don't like those heavy weight websites that take ages to load (hello WIX) with tons of js and those damned cookies. On the other hand I don't like to make static websites myself in html like in the 90s which look super sparse (though they load very fast). What I would really like is to make use of my Swift/SwiftUI knowledge in web. Been thinking about some minimal framework or some kind of method to do that. Found some toy projects but I don't want to bring the iOS L&F to the web, I want websites to look like websites but made with SwiftUI. No more CSS and HTML. Compiling SwiftUI to html is the first naive idea that comes to mind. But I lack the broad knowledge of web technologies out there so I find myself unable to devise anything that could nearly rival other sophisticated frameworks.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’24
Reply to safari-not-sending-cookie-even-after-setting-samesite-none-secure
Added more point to clear the issue about cookie store issue in safari browser. Our application uses cookies to remember user login. Every auth API call we make, the browser attaches server-set HTTPOnly cookie with the API request and gets a response. This behaviour seems to be broken in safari after Sequoia release. I read about the cross-site cookie security implemented by safari and our server team added SameSite=None;Secure while setting the cookie. Even after that, it still doesn't work. Cookies are stored in the safari browser but it is not added into the request header on API call. Javascript API code to make requests with httpclient to get the response using Cordova framework in mobile app. The problem is on iOS/safari , the subsequent request does not send the cookie Header with the value. Android is working fine with the same code. Only Issue in iOS device. System Information- OS - Sequoia 15.1 Safari - 18. iOS Simulator - 18.1 Mobile ap
Topic: Safari & Web SubTopic: General Tags:
Nov ’24
Authentication for Safari Web Extensions
My Safari Web Extension got rejected with the following reason: Guideline 4.0 - Design The user is taken to a new Safari window or tab to sign in or register for an account, which provides a poor user experience. Is this right? First of all Design guide line 4.0 does not seem to mention antyhing about this topic. Second, I've seen many, many web extensions that opens a new tab to let you sign in or register. Including top recommended ones like Grammarly, PayPal Honey and Pocket. The review also mentions: It is acceptable to take users to the default web browser for some sign in or account registration options if ASWebAuthenticationSession is used for the session. That does not seem right either, since that is primarily designed for native apps. I'm pretty sure the extensions I've tried that open a tab for authentication does not use that. It is like my Safari Web Extension is being reviewed like a Mac OS app. What am I'm doing wrong?
1
0
471
Nov ’24
Web Extension : browser.cookies.getAll() does not work
After upgrading to Safari version 18, we encountered an issue with my extension’s background script not being able to access cookies. Previously, in Safari versions 17 and below, the extension worked as expected. Now, when the extension tries to retrieve cookies using browser.cookies.getAll(), it returns an empty list. However, if we open the extension’s developer tools, the cookies are visible and accessible. It seems that Safari only provides cookie data after the developer tools have been opened. However, after relaunching Safari and launching the extension without opening the developer tools, browser.cookies.getAll() still returns an empty list. Has anyone else experienced this? STEPS TO REPRODUCE Download this minimal app : https://www.icloud.com/iclouddrive/0bajlhnuQaG6T5NsFKXEB0U9Q#test%5Fcookies Compile test_mv2 extension (in test_cookies.getAll.zip). Launch test_mv2.app and activate extension. Click on the extension's button (browserAction). Open the developer tool
3
0
664
Nov ’24
Safari - cookie setting default behavior in iOS 18
Hello! I have a question about changes in default behavior of Safari related to cookie setting. We had an issue - our Single Sign On login was not working, because of lost cookie on some step of the flow. Only changes in Safari cross-website tracking settings helped to fix the issue So the question is - are there any official documentation about changes in cookie setting policy in Safari on iOS 18?
Topic: Safari & Web SubTopic: General Tags:
0
0
381
Oct ’24
Discrepancy in Cookie Consent Options Across iOS 18.0 and 18.1 on Certain Websites
I've observed a discrepancy in cookie consent options between iOS 18.0 and 18.1 on some websites, such as www2.hm.com. On iOS 18.0, I see Accept All Cookies and Only Required Cookies options, whereas on iOS 18.1, the options change to Accept All Cookies and Cookie Settings. I would like to understand if this behavior is related to differences in how websites detect the operating system version (iOS 18.0 vs. 18.1) or browser changes within the iOS update. Has anyone else experienced similar variations in cookie consent banners, and could this be tied to differences in the user agent or website A/B testing for different OS versions? Any insights or technical clarifications would be appreciated!
0
0
645
Oct ’24
ASWebAuthenticationSession Async/Await API
Is there any particular reason why ASWebAuthenticationSession doesn't have support for async/await? (example below) do { let callbackURL = try await webAuthSession.start() } catch { // handle error } I'm curious if this style of integration doesn't exist for architectural reasons? Or is the legacy completion handler style preserved in order to prevent existing integrations from breaking?
1
0
453
Oct ’24