Search results for

ASWebAuthenticationSession cookie

1,297 results found

Post

Replies

Boosts

Views

Activity

Reply to iOS 11.3: WKWebView cookie synchronizing stopped working
This is a bit of a retrospective, but we have just been bitten terribly by the bug/change. We read a million articles / this forum / stackoverflow questions that all seemed to stem from cookie behavior changing in 11.3/11.4/12+, I've read this forum dozens of times. Our app got hammered by negative reviews, as users continuously kept getting logged out as the cookies stopped working consistently, and users were tweeting and calling our support center. Our QA process could not reproduce what was going on, we haven't pushed an App Store update to our app in months. Sometimes it worked, sometimes force closing worked, sometimes when you logout/login-as-another-user, then force close, and re-enter the app, you were logged in as the previous user, chaos...Tangent: I'd like to complain that in iOS that there isn't just one best WebView class. It got splintered into UIWebView, and WkWebView, and app developers had to deal with intricacies related to managing networking, and cookies with ea
Topic: Safari & Web SubTopic: General Tags:
Oct ’18
Exception in WKHTTPCookieStore.getAllCookies. No message.
I'm trying to observe cookie changes when I use `WKWebView`. I added my AppDelegate as an observer:WKWebsiteDataStore.default().httpCookieStore.add(self)The application starts and immediately `cookiesDidChange` fires. I then get an exception with nothing useful printed in the console. Xcode shows this on the third line below: WebThread (15): EXC_BREAKPOINT (code=1, subcode=0x1c67e03f4)func cookiesDidChange(in cookieStore: WKHTTPCookieStore) { print(cookiesDidChange!!) cookieStore.getAllCookies{ cs in } // <-- crashes hereI added some logic to not call `getAllCookies` until after some WebViews are created. It then succeeds a few times but fails again in same way.Any ideas? Is there some thread safety issue around called `getAllCookies`?Rob
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
1.6k
Oct ’18
Reply to How to better diagnose -1001 "The request timed out." URLSession errors
Also, is there a way to capture the CFNetwork diagnostic os_log output from within our app/process …No. There are numerous difficulties in making that work [1] but I realise that it’d be a super-useful feature so don’t let that stop you from filing an enhancement request describing your requirementsPlease post your bug number, just for the record.To get CFNetwork diagnostics information from devices in the wild, am I correct in thinking we need to first setenv(CFNETWORK_DIAGNOSTICS, 3, 1); in main() … Correct.and probably put this behind some kind of remote flag or Settings.app setting to avoid doing it for all our usersIf you put this in a production build, make sure that the UI informs the user of the privacy risks involved in enabling it.then have the appropriate users install the profileThat step is not necessary.capture a sysdiagnose and send it to us?Yes.Without setting the env var will there be anything useful in a sysdiagnose … ?Yes, although it’s hard to say whether that will help you debug this ques
Oct ’18
can i know what is the problem in this post request with header?
let posturl = URL(string: https://parivahan.gov.in/rcdlstatus/vahan/rcDlHome.xhtml) var postreq = URLRequest(url: posturl!) postreq.httpMethod = POST HTTPCookieStorage.shared.setCookies(cookie, for: posturl!, mainDocumentURL: nil) postreq.setValue(https://parivahan.gov.in/rcdlstatus/?pur_cd=102, forHTTPHeaderField: Referer) postreq.setValue(application/x-www-form-urlencoded, forHTTPHeaderField: Content-Type) postreq.setValue(parivahan.gov.in, forHTTPHeaderField: Host) postreq.setValue(application/xml, text/xml, */*; q=0.01, forHTTPHeaderField: Accept) postreq.setValue(en-US,en;q=0.5, forHTTPHeaderField: Accept-Language) postreq.setValue(gzip,deflate, br, forHTTPHeaderField: accept-encoding) postreq.setValue(XMLHttpRequest, forHTTPHeaderField: X-Requested-With) postreq.setValue(partial/ajax, forHTTPHeaderField: faces-request) postreq.setValue(https://parivahan.gov.in, forHTTPHeaderField: Origin) let userAgent = Mozilla/5.0 (Windows NT 6.1; Win64; x64) + AppleWebKit/537.36 (KHTML, like Gecko) Chrome/6
0
0
814
Oct ’18
Detect Cross Site tracking in Safari
We are developing a website which is exchanging cross site cookies. Since, the default settings for safari is to prevent the cross site tracking, the cookie is not passed in the calls, impacting the further functionalities.Is there any way to detect the current safari cookie settings using Javascript?
1
0
1.7k
Oct ’18
Sorting Struct Array by Elements in Another Array (Swift)
Ok so I'm wanting to sort an array based off of another array. Ok so that probably sounds pretty confusing so let me explain.Alright so let's make an example of an app about grocery shopping. Ok so I have an array like this: var fruitsArray = [String:Int]()Let's say that the values of the array are [apple:32, banana:45, grape:7, strawberry:23]Ok so first off, I sort this array by the `Int`, descendingly, which gives us [banana:45 apple:32, strawberry:23, grape:7]Ok great. But now I want an array of shopping lists and each element of that array contains an array of food. So let's make a `Struct`... struct List { var name:String = var items:[String] = [] init(name: String, items: [String) { self.name = name self.items = items } }and then an array of `List`... var shoppingLists = [List]()finally, let's add some elements to `shoppingLists`... [List(name: List 1, items: [banana, pizza, watermelon, apple]), List(name: List 2, items: [cookie, water, grape, apple]), List(name: List 3, items: [apple, strawbe
2
0
1.9k
Nov ’18
Reply to safari.application in Safari App Extension
We have the same situation in which we must be aware of the redirect chain in order to determine if our extension should stand down and not inject any content within the page for complaince with our partners terms.7. Software Publishers must recognize and respect publisher-driven traffic immediately prior to the software dropping a cookie. Specifically, all software must recognize CJ domains and afsrc=1 codes in affiliate links. When a CJ domain or the afsrc=1 code is detected, the software may not operate or redirect the consumer to the advertiser site using the Software Publisher's PID.It appears that there are no longer any events (specifically navigation events) coming from the browser beyond just messages that can be dispatched from the injected script which occur too late in the flow as injections do not occur during server side redirects. We have investigated the use of validateToolbarItem(in:validationHandler) with SFSafariExtensionHanlding however this does not fire during redirects even if
Topic: Safari & Web SubTopic: General Tags:
Nov ’18
Reply to safari.application in Safari App Extension
Hi Steve,I've actually raised a TSI with Apple over this issue and here's what we got back.Thank you for contacting Apple Developer Technical Support (DTS). We have reviewed your request and have concluded that there is no supported way to achieve the desired functionality given the currently shipping system configurations.If you would like for Apple to consider adding support for such features in the future, please submit an enhancement request via the Apple Bug Reporter tool at <https://developer.apple.com/bug-reporting/>.In the meantime, you can try injecting a script into the webpage that checks the window.location.href and redirects after the fact if there is no affiliate code on the URL to start with.Hopefully this helps.The problem with his potential solution (as I understand it) is that the redirect has already happened by the time the code is injected and therefore it get's missed.I notice from your post that your refering specifically about CJ affilates, we've even contacted CJ to see if there
Topic: Safari & Web SubTopic: General Tags:
Nov ’18
SFAuthenticationSession and ASWebAuthenticationSession prompt for consent every time
HelloWe developed an application to use SFAuthenticationSession in iOS 11 and ASWebAuthenticationSession in iOS 12 to do SSO login. Customer complains iOS pops up a consent dialog asking to allow the app to connect the authentication provider, and the consent popup appears every time when authentication session is started.Should this consent popup only appear once, like the other consent dialogs, etc. Push Notification Service, Location Service?Best RegardsPaul Xi
1
0
2.0k
Nov ’18
SSO isn't working even after setting cookie in WKWebview
I have 2 applications, both app uses the WKWebview for SSO login. Both apps are working fine individually.Now let's take this below scenario.Suppose i logged in one app, retrieved the WKWebview cookie from this app & set this cookie info in WKWebview of 2nd app.My expectation is SSO should work in 2nd app but it isn't working.Below is the code i am using for Retrieving cookie from WKwebview after login from 1st appextension WKWebView { @available(iOS 11.0, *) private var httpCookieStore: WKHTTPCookieStore { return WKWebsiteDataStore.default().httpCookieStore } func getCookies(for domain: String? = nil, completion: @escaping ([String : Any])->()) { var cookieDict = [String : AnyObject]() if #available(iOS 11.0, *) { httpCookieStore.getAllCookies { (cookies) in for cookie in cookies { print(cookie iterator started) print(cookie=======(cookie)) if let domain = domain { if cookie.domain.contains(domain) { cookieDict[cookie.nam
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
2.2k
Nov ’18
Reply to SSO isn't working even after setting cookie in WKWebview
just clear old cookies before adding new cookies into the WKWebView. You will get succeed.WKWebsiteDataStore.default().fetchDataRecords(ofTypes: WKWebsiteDataStore.allWebsiteDataTypes()) { records in records.forEach { record in WKWebsiteDataStore.default().removeData(ofTypes: record.dataTypes, for: [record], completionHandler: {}) print([WebCacheCleaner] Record (record) deleted) } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Nov ’18
Reply to Getting NSURLError in XCode for the iOS App running on windows server without Forward Secrecy setup. Is Forward Secrecy mandatory?
Hi Quinn -With the suggested configuration, we can hit the server and log in page, but once a log in attempt is made, it produces the below diagnotistic output simulating iPhone 7 (12.1) is below. It is actually the same error we get today for the existing app in the App Store that is configured with ATS disabled.2018-11-28 08:41:42.637467-0700 Vistar[35138:2786742] CFNetwork Diagnostics [3:363] 08:41:42.637 { LoaderWhatToDo: (null) Request: {string = https://myvistar.vistar.com/CGI-BIN/lansaweb?webapp=WB001M01+webrtn=verifyLogin+ml=LANSA:XHTML+partition=PRX+language=ENG, encoding = 134217984, base = (null)} CachePolicy: 1 WhatToDo: originload CreateToNow: 0.00029s } [3:363] 2018-11-28 08:41:42.637798-0700 Vistar[35138:2786744] CFNetwork Diagnostics [3:364] 08:41:42.637 { AddCookies Continue: request POST https://myvistar.vistar.com/CGI-BIN/lansaweb?webapp=WB001M01+webrtn=verifyLogin+ml=LANSA:XHTML+partition=PRX+language=ENG HTTP/1.1 HTTPProtocol: Task: 787c00 } [3:364] 2018-11-28 08:41:42.638273-0700 Vistar[
Nov ’18
Reply to Where can TIC TLS event codes be found?
Thanks Quinn,I'm working on getting a packet capture if I can, and am adding in more logging to our own tools to see if I can suss any more details out of what is happening. It feels like a network issue, but we can't replicate it on demand at the customer site or in our labs.The TLS events I am interested in are 1, 2, 11, 12, 14, and 20. More than anything I guess I'm looking for a sanity check that I'm interperting these logs properly.Annotated, and redacted, logs below. This Mac is on 10.13.6 and Wi-Fi.Here we see the program flow from the user clicking Sign In all the way to the network disconnect.SecurityAgent: (NoMADLoginOkta) [menu.nomad.login:UI] Sign In button clicked SecurityAgent: (NoMADLoginOkta) [menu.nomad.login:UI] Format user and domain strings SecurityAgent: (NoMADLoginOkta) [menu.nomad.login:UI] Using managed domain SecurityAgent: (NoMADLoginOkta) [menu.nomad.login:UI] Removing domain from username SecurityAgent: (NoMADLoginOkta) [menu.nomad.login:NoLoSwiftMech] Checking for local username S
Dec ’18