Search results for

ASWebAuthenticationSession cookie

1,295 results found

Post

Replies

Boosts

Views

Activity

Get cookies - Safari web extension macOS 18.1
I have a macOS safari web extension and It can read the cookies of my website, but when I fully close safari and open it again the extension can't read the cookies anymore. When I try to inspect the cause in the console (safari > develop > web extension background content) everything starts to work again. My safari version is 18.1 (19619.2.8.111.1, 19619)
4
0
591
Oct ’24
Tracking Transparency
Long story short. My app tracks users via cookies and allows them to see relevant ads and such. Apple wants me to implement App Tracking via Xcode. The issue is I am running on Windows OS and do not have the ability to make the changes needed to get this app approved. The app was built through a 3rd party app building site, and they have no solutions at this time. So not unless someone has an idea on how to make these changes myself, I am all ears.
0
0
1.7k
Oct ’24
In the callbackURLScheme scheme of the ASWebAuthenticationSession If a custom scheme is not available
I am currently implementing an authentication function using ASWebAuthenticationSession to log in with my Instagram account. I set a custom scheme for the callbackURLScheme, but In the Instagram redirect URL I was told I can't use a custom scheme. What should I do with the callbackURLScheme of the ASWebAuthenticationSession in this case?
2
0
670
Oct ’24
ASWebAuthenticationSession does not work well.
I'm currently implementing a function in SwiftUI to log in with my Instagram account. It's not working, I'm creating a Firebase Auth function and it comes back to the redirect URL. This may happen if browser sessionStorage is inaccessible or accidentally cleared. This may happen if browser sessionStorage is inaccessible or accidentally cleared. I get this error. I can't implement it. I have tried various methods, but all have failed. If anyone knows how to do this, please help. import SwiftUI import AuthenticationServices import FirebaseAuth struct InstagramLoginView: View { var body: some View { VStack { Text(Login with Instagram) // タイトル Button(action: { // ボタンが押された時にInstagramのログイン処理を開始 InstagramLoginHelper().startInstagramLogin() }) { Text(Login with Instagram) .padding() .background(Color.blue) .foregroundColor(.white) .cornerRadius(8) } } } } class InstagramLoginHelper: NSObject, ASWebAuthenticationPresentationContextProviding { func startInstagramLogin() { let clientID = XXXXXXXXXXXX let redirectURI = h
1
0
560
Oct ’24
Instagram login using ASWebAuthenticationSession
I am currently using the ability to log in with my Instagram account using ASWebAuthenticationSession and it is not working! I filled in the URL directly and there was no problem on the web, but when I run it in SwiftUI in Xcode, it doesn't work and Error: The operation couldn’t be completed. (com.apple.AuthenticationServices.WebAuthenticationSession error 2.) I get this error. I was told that I need a custom scheme to return to mobile, but the Instagram redirect URL says no custom scheme. What should I do? IDs and URLs are placed under assumption. I have no idea since this is my first implementation. Should I send the scheme URL from the website to mobile once using Django or something else? import SwiftUI import AuthenticationServices struct InstagramLoginView: View { @State private var authSession: ASWebAuthenticationSession? @State private var token: String = @State private var showAlert: Bool = false @State private var alertMessage: String = var body: some View { VStack { Text(Instagr
2
0
913
Oct ’24
Reply to WKWebView adding cookie does not work with iOS 18 beta
Is the cookie not there, or is it there but with the wrong SameSite value? It seems in iOS18, the default SameSite value is now Lax instead of None if the server doesn't set it. I opened another forum post about it here https://developer.apple.com/forums/thread/765199 and contacted Apple support. Hoping Apple will have a workaround, as I cannot change what the server does (Salesforce in my case).
Topic: Safari & Web SubTopic: General Tags:
Oct ’24
Reply to Cookies problem in iOS beta 18
As @Rikardt pointed out, this could be an issue with Apple changing the default cookie SameSite. I created another post about it here with a sample app: https://developer.apple.com/forums/thread/765199 Hoping Apple will have a workaround, as I cannot change what the server does (Salesforce in my case).
Topic: Safari & Web SubTopic: General Tags:
Oct ’24
Reply to Cookies problem in iOS beta 18
@jkhkhbjhbj In the Cordova context we got the Cookies to move in both IOS 18.0 and IOS 18.1. IOS 18.0 being more complex. We basically had to manually inject the cookies from the NS to the WK store. This worked in 18.1 but in 18.0 we have had to one more step to launch the InAppBrowser plugin with a dummy URL to the server (Hidden Call). This then made the cookies available in the IFrame as well. !Important : You could also be hitting issues with the Cookie SameSite where when not passed from server will default to Lax not None like it did before. This can cause issues in an iframe as well as it does not send Lax on post requests. We fixed this by making sure None was set from the server side ( can't do this locally).
Topic: Safari & Web SubTopic: General Tags:
Oct ’24
WKWebView default SameSite value for cookies is different in iOS18
In iOS18, WKWebView's default cookie SameSite value is Lax. Prior to iOS18, the default value is None. Is this intentional, or a bug? This change is not documented anywhere. I made a sample XCode project (ViewController code below) to show this change. It loads www.apple.com into a WKWebView and prints cookies. That site has several cookies, but it only explicitly sets SameSite to None for one cookie, s_vi. Every other cookie relies on default WKWebView behavior. When looking at cookies, either in the console or in Safari's Web Inspector, the SameSite value differs. If older than iOS18, every cookie has SameSite of None. If iOS18, all cookies except s_vi have SameSIte of Lax. I also tried manually setting the following cookies: testCookie-none with SameSite set to None testCookie-lax with SameSite set to Lax testCookie-strict with SameSite set to Strict testCookie- with SameSite set to an empty string When looking at these cookies
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
1.9k
Oct ’24
Reply to iOS 18 HTML images are not loading in WKWebView
Yes, I have identified the issue. Normally, when loading this image URL with URLRequest, there is no problem, and cookies are set when loaded in the WebView. However, my problem occurs here: webView.loadHTMLString(htmlString, baseURL: baseURL) If you leave the baseURL part as nil, the cookies are not recognized, and the images could not be loaded in iOS 18. If you set your default domain URL in the baseURL part, the issue is resolved because the WebView sets the cookies to the baseURL and loads the HTML from there. Thank you.
Topic: Safari & Web SubTopic: General Tags:
Sep ’24
iOS 18 HTML images are not loading in WKWebView
iOS 18 WKWebView images are not loading, no errors in older versions. The example while loading HTML is as follows. A problem occurs when you pull an image from a url. To get a URL image you need a cookie or something. I add them too, but it doesn't work on iOS 18. I get the error An error occurred trying to load the resource. and a blue question mark on the screen. webView.configuration.websiteDataStore.httpCookieStore.setCookie(cookie) Resim Görüntüleme
2
0
2.5k
Sep ’24
Reply to How to get Password AutoFill to work with ASWebAuthenticationSession?
I'm working also with ASWebAuthenticationSession, and prefersEphemeralWebBrowserSession does not affect to show or not the promp to save the password. Basically, as @ArcadianZ said, ASWebAuthenticationSession is not able to show the save password Alert/prompt asking the user to save the user/password in Passwords App. I'm trying to think why and maybe it's because the save prompt happens on the URL after when it's entered, and in this case it's a redirect to an app URL?
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’24