Search results for

ASWebAuthenticationSession cookie

1,297 results found

Post

Replies

Boosts

Views

Activity

ReferenceError: Can't find variable: loadHomepageTiles
Hi,I am having this error in iphone . I am not able to figure out where it is coming from. I have not taken any such variable in my code.I have seen this error mentioned in stackoverflow and others but no answer there.I see this error is coming in iphone only . SpecficationUser Agent: ========================================================================================== Browser = WebKit Browser Version = 605.1.15 Mobile = mobile Apple iPhone OS = iOS OS Version = 11.4 Cookies = true Screen = 375 x 667This error is also coming in OS version 11.4 , 11. 3 , 10.3. Can you tell me is this is error is iphone safari , ios specific ? Does it effect client ?Thanks
Topic: Safari & Web SubTopic: General Tags:
1
0
3.6k
Sep ’18
iOS 12 : Notification NSHTTPCookieManagerCookiesChangedNotification not called correctly
Hi,On iOS 12, the NSNotificationCenter does not fire NSHTTPCookieManagerCookiesChangedNotification correctly like on iOS 11 when a cookie is set the second time the webview is called.The first time, after NSHTTPCookieManagerCookiesChangedNotification callbaclk, in [NSHTTPCookieStorage sharedHTTPCookieStorage] array all the cookies are not include. Some cookies sets are missingIs there someone who encountered the same issue ? Thanks for your answers
4
0
1.7k
Sep ’18
How to download a PDF via WKWebView but open it in QuickLookPreview?
Hello forum!I have a special problem with my iOS App.My setup is the following:Swift 4 app with minimum target iOS 11the app consists more or less of single view with a WKWebView which is connected to the client portal of a health insurancethe client portal provides a login (session cookies) and allows to download pdf documents when logged-inI want the downloades pdf files to be opened in QuickLookPreviewController instead of WKWebView.The customer need is that they want to be able to print or share their documents and I like to use the QuickLookPreview therefore, because it offers the best native feeling for this case.Now to my problem:I managed to download the documents to local storage (temp folder) and to open it in QuickLookPreviewController with a little trick:The response of the download is intercepted (by using webView(..., decidePolicyFor ...)) and the download url is used to trigger a separate download (using URLSession.shared.dataTask(with: downloadUrl)) to iPhone storage, because QuickLoo
Topic: Safari & Web SubTopic: General Tags:
6
0
33k
Sep ’18
Unable to create cookies in Safari browser with httpOnly flag
I unable to create cookies in Safari browser with httpOnly flag.See below piece of codeRequestDispatcher rd = request.getRequestDispatcher(pages/welcome.jsp);Cookie currCookie = new Cookie(userInfo, username: + u + password: + p);currCookie.setDomain(anil.mlbextrabases.com);currCookie.setComment(creating cookie); currCookie.setPath(;Path=/;HttpOnly;);currCookie.setMaxAge(31536000);response.addCookie(currCookie);response.setHeader(Strict-Transport-Security, max-age=7776000; includeSubdomains);rd.include(request, response);The above code able to set cookies in all others browsers (Chrome, Firefox , IE).If the remove httpOnly flag , then cookies are created succussfully safari as well . //currCookie.setPath(;Path=/;HttpOnly;);I did a lot of R&D over developer communities. But it not helped.Please suggests
0
0
1.8k
Sep ’18
Is acceptable business model
Hello,I would like to create and publish application which works with another service (next Service). Service has public API, but to get acces to it, you should be approved by this Service. So I would like to use cookies instead API. I would like to let user auth via browser inside of my app, and after it use cookies with requests to communicate with this Service without their API. Business model - I would like to create help mechanism to make easier some user actions. To make some actions user should request this actions from app, this means app will not make spam or something like that.Example application flow:1. Hello screen with Login button2. Web browser where I load Service's site, with my own injected script which check is user authenticated3. Checking authentication with some request like get basic user info with cookies, and after 200 code allow user access to other application features4. ...using app, and when user want to exti -> clear cookies and show Hello s
2
0
554
Sep ’18
Reply to iOS 11.3: WKWebView cookie synchronizing stopped working
I can confirm this problem still exists in the latest iOS12 Release version.Our worklfow is quite simple:We basically have a viewcontroller with a webview.From a second viewcontroller we navigate to the webview-viewcontroller.There we call webview.configuration.websiteDataStore.httpCookieStore.setCookie(XXX)After its completion, we load the webview.So I went trough a lot of debugging and setting breakpoints and what i found out: on the first appstart (quit app in backround and make a fresh start), when the viewcontroller with the webview is loaded the first time, the following happens:- webview.configuration.websiteDataStore.httpCookieStore is empty, which is correct- we call webview.configuration.websiteDataStore.httpCookieStore.setCookie(XXX) to set our cookie- the completion handler gets called.- after short delay the func cookiesDidChange(in cookieStore: WKHTTPCookieStore) gets called, which is also expected- so with the completionhandler of setCookie complete and even the observer cookiesDidChan
Topic: Safari & Web SubTopic: General Tags:
Sep ’18
Reply to How to download a PDF via WKWebView but open it in QuickLookPreview?
Hi againWith external help, I was able to fix my problem.The solution ist now to avoid the separate download task with URLSession.shared.dataTask and hence avoid the sync problem between the WKWebView cookie storage and the shared cookie storage.The download ist now performed with JavaScript.I'm able to detect and intercept the request in func webView(_ webView: WKWebView, decidePolicyFor navigationAction ...).When such a request is detected, I cancel the decision handling and call the JavaScript part with the download.The JavaScript is executed in the WKWebView and hence I have all the authorization cookies in place and the download is successfull.JavaScript then returns the downloaded document as binary blob which is taken over by a JavaScript message handler in Swift.Then I just have to write the blob to a file and open the file in QuickLook preview. Works like a charm!Here's the code in case somebody struggles with the same problem:class ViewController: UIViewController, WKUIDel
Topic: Safari & Web SubTopic: General Tags:
Sep ’18
Reply to iOS 11.3: WKWebView cookie synchronizing stopped working
Hi, i will do so as soon as possible.But I can give an update to my workflow:It seems like my solution by calling webview.configuration.websiteDataStore.httpCookieStore.getAllCookies() did not work as reliable as it should have. So I overhauled my code and at least fo now, it seems like i finally found a solution for my situation:It seems like it makes a difference if you try to add cookies to an existing WKWebview or if you create one after setting the cookies. Somewhere on stackoverflow people reported that an already existing WKWebview sometimes ignores set cookies (at least on a fresh appstart)So we are now using the following workflow (code simplified)://Instead of adding the cookies to an already existing instance of a WKWebview //We create the webview only !after! setting all cookies: //Create a new WKWebViewConfiguration and a new WKWebsiteDataStore let config = WKWebViewConfiguration() let wkDataStore = WKWebsiteDataStore.nonPersistent() //Get sharedCookie
Topic: Safari & Web SubTopic: General Tags:
Oct ’18