Search results for

ASWebAuthenticationSession cookie

1,295 results found

Post

Replies

Boosts

Views

Activity

Reply to iOS11: Cookies intermittently blocked
We are having similiar issues with our web app since upgrading to iOS 11 and we are not using iFrames either. At times the cookie will not be present in the request to the login service thus forcing the user to login. Other times it will be present when it shouldn't be (after expiring it from the logout service).When logging in we add a persistent authentication cookie. When you log out, close the app then relaunch it will sometimes log you right back in to the application because it isn't removing the expired cookie and can be seen in the request back to the login service when launching the application.Other times it is like you described where you login, close the app without logging out. Then launch the application again from the home screen. The persistent cookie is not present in the request at all thus forcing the user to login again.It is hard to troubleshoot also because for some reason the device wont appear any more in the Safari Web Inspector on Mac when trying t
Topic: Safari & Web SubTopic: General Tags:
Oct ’17
Reply to iOS11: Cookies intermittently blocked
Sounds like the exact same problem we are having.What happens if you wait ~10 minutes before you start the web app again after a failed start up? Our web app seems to heal over time. When waiting a couple of minutes after a startup failed (ie cookies were missing in request) before starting the web app again the login request works fine again.It's realy annoying not being able to inspect the client when running it in standalone mode!
Topic: Safari & Web SubTopic: General Tags:
Oct ’17
Reply to iOS11: Cookies intermittently blocked
We were also having similar issue but found workaround for it.In iOS 11, cookies are not shared between Safari and each web apps, but it seems a web app sometimes uses cookies that are cached in Safari side when sends a request. We guess this behavior (probably a bug) causes session invalid.We have been calling web api using Fetch, when using it with a cache: no-store option, the behavior was fixed:fetch('/path/to/auth', { credentials: 'same-origin', cache: 'no-store' });At least this workaround is working fine for our case.
Topic: Safari & Web SubTopic: General Tags:
Oct ’17
Reply to iOS11: Cookies intermittently blocked
This doesn't appear to help with non-XHR requests at least.For example, I am using the Fetch API to send a request to the server to authenticate. The server then sets an auth cookie in the response, and then I redirect to a server-rendered page that requires the auth cookie:function logIn() { fetch('@Url.Action(Login)', { method: 'POST', cache: 'no-store', credentials: 'same-origin' }) .then(() => { window.location.href = '@Url.Action(Index)'; }); }I am also making a similar fetch and redirect for the logout. When I close the home screen web app and re-open it after logging in or out, I can still reproduce the same issue as before where the cookie is not sent when it should be sent, or is sent when it should have been deleted. I also tried setting cache control headers on the responses, and that didn't seem to help.I have only ever been able to reproduce this when closing and re-opening the home screen web app. As long as I keep it open and navigate from page to page via JavaScript, the cookies
Topic: Safari & Web SubTopic: General Tags:
Oct ’17
Reply to iOS11: Cookies intermittently blocked
Turns out I was able to reproduce this behavior entirely in JavaScript:https://github.com/bencompton/ios11-cookie-set-expire-issueIt seems that setting or expiring a cookie, and then closing and re-opening the home screen web app causes the cookie to intermittently be in the incorrect state.
Topic: Safari & Web SubTopic: General Tags:
Oct ’17
Reply to Cookies are not send with the request in Safari on iPhone and iPad
Thanks for your reply. I have tried this option, but no luck yet.For me, I can see the cookie created in device with size of 5.1 MB for the domain which I am working on. But I can not see this same cookie with the request object for the subsequent request.If I logout and login again without closing the safari browser, then I can see the cookies is there in the Request object. But if I closes the safari browser and re-opens, then the cookies is not there with the Request object.
Oct ’17
Prevent Cross-Site Tracking - Basic Authentication?
We run a website on Apache which uses Basic Authentication.This website forwards to a third party website to take credit card payments then returns to our website.When we have Prevent Cross-Site Tracking switched on (default) in iOS 11 when we are returned from the payment site to our site it prompts us to log on again.When we have the setting switched off and are returned to our website it carries on as normal without any prompt.So the sequence of events is;1. User logs on to our website using their logon/password.2. User fills their basket with goods.3. At checkout we forward to a third party for credit card payment.4. Once payment is made the payment website forwards back to our website - at this point the user is prompted to enter their credentials again.My understanding is that it's only cookies that are wiped between websites, are basic logon credentials wiped too?Is this how it's supposed to work?What options would we have to get round this wihtout asking all our customers to change a setting
0
0
1k
Oct ’17
Reply to How to: Access website information behind a required login page
It really depends on how the site does authentication. Most sites use HTML authentication, that is, they have an HTML form that POSTs a request that authenticates and then returns a cookie for the session token. You have two basic approaches for dealing with that:Load the site in a web view and then simulate filling out the form using JavaScript; once you’re authenticated, you can use JavaScript to query the DOM to find the values you’re looking for (A)Pull apart the site’s HTML to figure out what sort of request it’s running and then run that request with URLSession; you’ll then need to parse the results looking for the values you care about (B)Neither option is totally future proof, but A is likely to be more future proof than B.With regards A, I recommend WKWebView, which allows you to run JavaScript via the evaluateJavaScript(_:completionHandler:) method. You can also use user scripts ( WKUserScript) to load a script library into the page and script messages ( WKScriptMessage) to get async result
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’17
Terminating app due to uncaught exception 'NSInvalidArgumentException - ERROR BUG HELP!
Hi all!My app has been running perfectly until I upgraded to Xcode 9 and I keep getting this error message:2017-10-31 00:03:31.054133+0000 What Team[4057:403056] [DYMTLInitPlatform] platform initialization successful2017-10-31 00:03:31.115719+0000 What Team[4057:402959] [Application] Failed to instantiate the default view controller for UIMainStoryboardFile 'MainStoryboard' - perhaps the designated entry point is not set?2017-10-31 00:03:31.134559+0000 What Team[4057:402959] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles2017-10-31 00:03:31.135299+0000 What Team[4057:402959] [MC] Reading from public effective user settings.2017-10-31 00:03:31.137273+0000 What Team[4057:402959] [FYB Info]: Starting FyberSDK version 8.15.12017-10-31 00:03:31.146422+0000 What Team[4057:402959] Could not successfully update network info during initialization.2017-10-31 00:03:31.147021+0000 What Team[4057:4030
3
0
1.0.0k
Oct ’17
Reply to UIWebView problem in iOS11
I filed a bug with Apple as well. Same problem. We have angry users calling 24/7 right, saying usability completely ruined. Then upgraded to use WKWebView with another disaster to follow due to many other issues, among others no cookie (with xhr) support, no file:// support and other random errors - some http calls related to image uploading fails.After upgrading to WKWebView we have decided to downgrade again to UIWebView. This means we have the issues you are describing here, and some very angry users.We have no issues in other webkit based products, that is Chrome, Safari, Android web views etc. Only WKWebView not compliant, and UIWebView broken.Hoping for a fix, otherwise we will have to recommend our users to change to buy Samsung or other Android equipment, as we have several companies that depend on our app for everyday operation.
Nov ’17
how to get a alert when an http request needs some credentials to be given in webview
Hello,I am developing an app which has a webview embedded in it. We have our own AD server for authentication. After 2 url request, it automatically goes to an url that requests for credentials in safari browser. But in xcode it doen't. I need some tips where i can handle that request, add some credentials and then allow to procced. The response will have cookies based on that we classify customers. I have implemented it in WKwebview but the tokens from the active directory i not accessed. Please guide me as i am new to xcode development!!
2
0
492
Nov ’17