Hi :) I am building browser extension that is integral part of our bigger web service. Since it needs to authenticate with our web application to use its api. Extension was originally developed for the Chrome and there everything works perfectly fine without any additional work. When I am authenticated on the platform I am able to use extension on any website and while making api calls from extensions background script to the platform backend the cookie is automatically attached to it. I just do fetch without any headers etc everything works out of the box. Then I used the xcrun safari-web-extension-converter and converted the chrome extension to safari. I tested local build as well as build submitted to test flight and none of these seems to work the same way as on chrome. Meaning I am not able to make this safari extension pick up the cookie from my web application. I found that if I disable: prevent cross-site tracking in Safari Settings it works. But obviously its not a solution for the
Search results for
ASWebAuthenticationSession cookie
1,295 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
The issue has been resolved. There was some additional layer of cookies access protection on our website and it blocked reading cookie with CRSF token. There is no issue within WebKit and iOS then. Thread can be closed :)
Topic:
Safari & Web
SubTopic:
General
Tags:
I have a tipical web app setup where a front end SPA app (Blazor WASM) is communicating with a backend (.NET API). I control both environments and they are hosted at following locations: SPA: https://www.client-portal.company.com API: https://www.api.client-portal.company.com I use cookie authentication to authenticate users via the invite/confirmation code process. The problem is that I want to make a long lasting authentication cookie but Safari (and ONLY Safari) keeps setting the cookie to expire in 7 days. Now I am aware of the Webkit's tracking prevention policies defined here: https://webkit.org/tracking-prevention/#intelligent-tracking-prevention-itp However I'm either unable, or not smart enough to understand the first vs. second vs. third party logic defined there. In my head, the setup I have is the first party setup and I would imagine that many companies have a similar hosting setup/naming. I cannot place the API under the same URL as the front end app unless I do some r
Topic:
Safari & Web
SubTopic:
General
I'm testing my existing web extension with the new iOS version and browser.cookies.getAll({url: https://myurl.com}) stopped working. It returns an empty array. Is there another way to get the cookies?
Can you please file this through Feedback Assistant, ideally with a screen recording and/or repro case? ASWebAuthenticationSession uses WKNavigationDelegate under the hood, so it should be able to catch all the same things.
Topic:
Privacy & Security
SubTopic:
General
Tags:
The additionalHeaderFields value follows the Fetch standard's forbidden request header algorithm. Cookie is one of the forbidden fields.
Topic:
Privacy & Security
SubTopic:
General
Tags:
Interestingly, I left a simulator running for a long while and came back to my desk and hit the authenticate button. The Safari view caused by using ASWebAuthenticationSession came up, was blank/invalid, and I got a callback from the authentication provider.. The header that caused this was: Location: myapp://auth#state=17A26C7A-AFDE-4C3B-BA89-85FAA343F0DB&error=invalid_request_object&error_description=Expired%20jwt I'm partially happy it worked at least once, but am also confused it doesn't work when it should
Topic:
Privacy & Security
SubTopic:
General
Tags:
Hi there, I'm having some trouble with getting a OAuth Authorization Code redirect with a custom scheme to work with ASWebAuthenticationSession. I am trying to build an app that integrates with an authentication provider, in which I have configured like this: Callback URL: myapp://auth In my iOS app, I have define this as a custom scheme in my info.plist file. CFBundleURLTypes CFBundleTypeRole Editor CFBundleURLName com.abc.def CFBundleURLSchemes myapp Excuse the messy-ish code below, but I just want to see this work. import SwiftUI @main struct MyApp: App { var body: some Scene { WindowGroup { AContentView() .onOpenURL { url in print(Received URL in onOpenURL: (url)) Self.handleURL(url) } } } static func handleURL(_ url: URL) { print(Handled URL: (url)) } } import AuthenticationServices struct AContentView: View { @Bindable var viewModel = SomeViewModel() @State private var authSession: ASWebAuthenticationSession? @State private var presentationContextProvider = PresentationContext
I'm trying to set a Cookie on ASWebAuthenticationSession on iOS 17.4+ using the new available method additionalHeaderFields. I can use this method to set any header field but Cookie. As soon as I try to set this header, I receive the following error: Cannot start ASWebAuthenticationSession: Error Domain=com.apple.AuthenticationServices.WebAuthenticationSession Code=1 One or more provided headers are invalid. UserInfo={NSLocalizedFailureReason=One or more provided headers are invalid.} The same content, but with different name (Foo) is inserted as a header in the request. So, are there any limitation about setting cookies on ASWebAuthenticationSession? I've found any information abut this
This is going to be a problem for a lot of people and we probably need to raise developer awareness Previously the setting would cause the Mac Address to rotate each time you connect to a wifi network; turn it off stopped that and your hardware address would be used (or perhaps the random one just stayed the same). Now for iOS and MacOS there no way to stop it rotating each time you connect to anything. The new on/off switch controls whether the address rotates while you are still connected after XX minutes. This is an absolute disaster for the following situations: Networks where you want to pin a device to an IP address via DHCP Reservations so that you can QoS traffic going to that device. Networks were you want to lock children to an IP Address so that you can parent control what those kids can do on the internet. AirPlane and Hotel Hot Spots that you buy 5 hours of usage at high speed that link to your mac address Networks with really Long DHCP lease times to ensure stablility will find that Apple Device
Topic:
App & System Services
SubTopic:
Networking
@Knyhuus an identical function similar to what you have in the scope of the .navigationDestination(for:) closure would be: @ViewBuilder func itemViewFor(destination: Destination) -> some View { switch destination { case .cookie: CookieView() case .milk: MilkView() } } Secondly, StateObject property wrapper should be marked private and instantiated with the View.
Topic:
UI Frameworks
SubTopic:
SwiftUI
TESTABLE CODE: public enum Destination: String, Codable, Hashable { case cookie = Cookie 🍪 case milk = Milk 🥛 } final class Router: ObservableObject { @Published var navPath = NavigationPath() func navigate(to destination: Destination) { navPath.append(destination) print(||| Router: add to navPath: (navPath.count)) } func navigateBack() { guard navPath.count > 0 else { return } navPath.removeLast() print(||| Router: remove from navPath: (navPath.count)) } func navigateToRoot() { guard navPath.count > 1 else { return } navPath.removeLast(navPath.count) } } struct RootView: View { @ObservedObject var router = Router() var body: some View { NavigationStack(path: $router.navPath) { List { Button(action: { router.navigate(to: .cookie) }, label: { Text(Destination.cookie.rawValue) }) Button(action: { router.navigate(to: .milk) }, label: { Text(Destination.milk.rawValue) }) } .navigationBarBackButtonHidden() .navigationDestination(for: Destination.self) { destination in let _ = pri
Topic:
UI Frameworks
SubTopic:
SwiftUI
Hi all 👋 I've stumbled upon what I think is a bug in SwiftUI, but there might be an explanation for it, which I cannot to figure out. So here's the bug. Perhaps any of you know it. In short I found out that .navigationDestination(for: ...) runs multiple times when you abstract the logic away from the scope of the closure, into a function that should return the desired view from the type of destination. But if you keep the logic inside the scope of the closure it only runs once per destination. The longer explanation I've setup a small example of a setup, which I'm planning on building an entire app on. Basically it's MVVVM with a coordinator pattern. I've ditched the coordinator in this example to minimize code, but the router is present and is key to how the app should work: navigation happens from a central place at the root of the app. You should be able to copy all the code into a single file and run the app, to see what happens. It's a simple app with a rootview that can navigate to either Cookies
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tracking App Store sales from partner promotions is tough because most affiliate platforms still depend on cookies. I encountered this challenge myself, so I developed a SaaS platform to tackle it. You can now set up affiliate programs in minutes, monitor sales, and effortlessly pay commissions to your partners. Interested? Connect with me on LinkedIn: https://www.linkedin.com/in/tonipeinoit I'm here to help you get started. Best of luck!
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Recently started playing this game, when I restarted my computer once it glitched out and when I tried to open it again, it said last time you opened this app, it was force quit. Do you want to reopen it? then the app closes itself immediately. How can I fix this? How can I remove the caches?
Topic:
Graphics & Games
SubTopic:
General