Search results for

ASWebAuthenticationSession cookie

1,295 results found

Post

Replies

Boosts

Views

Activity

ASWebAuthenticationSession not working in Preview
class ViewModel : NSObject, ObservableObject, ASWebAuthenticationPresentationContextProviding { private var authSession: ASWebAuthenticationSession? func signInWithOpenID(provider: OAuthProvider) { let url = getOIDCAuthenticationURL(provider: provider) authSession?.cancel() authSession = nil authSession = ASWebAuthenticationSession(url: url, callbackURLScheme: com.ninjanutri) { callbackURL, error in if let error = error { print(Error: (error.localizedDescription)) return } guard let callbackURL = callbackURL else { return } guard let idToken = callbackURL.valueOf(id_token) else { return } self.signInWithIdToken(provider: provider, idToken: idToken) } authSession?.prefersEphemeralWebBrowserSession = false authSession?.presentationContextProvider = self authSession?.start() } public func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor { return ASPresentationAnchor() } } struct ContentView: View { @StateObject private var viewModel = ViewModel() v
1
0
460
Dec ’24
Reply to ASWebAuthenticationSession not working in Preview
Hi, Sorry to hear you are having problems getting previews working with ASWebAuthenticationSession. This sounds like an infrastructure issue in how previews interacts with the rest of the operating system. The best next step will be to file a feedback with diagnostics so we can take a look. Install the logging profile using instructions available here: https://developer.apple.com/bug-reporting/profiles-and-logs/?name=swift On your mac running Xcode, and on your physical preview device (if you are using one). Install the logging profile using the following instructions on your mac running Xcode; and if you are using one, your physical preview device (iOS or visionOS): https://developer.apple.com/bug-reporting/profiles-and-logs/?name=swift Then when you reproduce the problem in Xcode: Either (a) an error banner will appear, click the Diagnostics button in that banner; or (b) if you're not seeing an error but you still want to provide diagnostics you can get the same diagnostics window by going under th
Dec ’24
How to update data in a DataFrame
My project loads a CSV into a DataFrame and displays it in a Table (a MacOS app). So far so good ... but when trying to update a value in a column, I dont see anyway to update this value. The table gets the value for the column like this: func getColumnValue(row :DataFrame.Rows.Element, columnName :String) -> String { if row.base.containsColumn(columnName) { var value = if row[columnName] != nil { value = (row[columnName]!) } return value } ... But the documentation and googles dont show any way to update the same column. Any help is appreciated with cookies. Attempt to update: func setColumnValue(row :DataFrame.Rows.Element, columnName :String, value :String) { var column: [String?] = data[columnName] column[row.id] = value ... }
6
0
658
Dec ’24
Trends in App Store Connect--Swirling Circle
Using a Chrome browser in Windows, for several weeks (months?) now when I go to the Trends tab in App Store Connect (https://appstoreconnect.apple.com/trends/insights?pageid=8), the page loads, but the top two charts don't show up with current sales (units). Instead there is a swirling circle that doesn't resolve. I've deleted cookies and refreshed (F5) multiple times. The results are the same. Edge does the same thing. Anyone else?
1
0
277
Nov ’24
How does the Reddit app detect Safari’s Private Browsing mode when opening a Universal Link?
I’m trying to understand how the Reddit app knows to open in its anonymous mode when a link is opened from Safari’s Private Browsing mode. Does Safari explicitly pass any flag or metadata indicating the request originated from Private Browsing? Or is it inferred by the absence of shared cookies, session tokens, or other stateful data? If the detection is based on the absence of cookies, could this logic misidentify other stateless scenarios as ‘private’?
1
0
572
Dec ’24
CORS problem with Safari, S3, and XMLHttpRequests withCredentials
PLATFORM AND VERSIONOS XOSX 10.12.5, Safari 10.1.1. We've tested on multiple machines (Safari 10.1.2 as well).DESCRIPTION OF PROBLEMWe're migrating from a single server to AWS and have had a number of issues with CORS. We have some users with proxies, and in order to fix our proxy CORS issues, we enabled cookie forwarding in CloudFront and added withCredentials=true to all of our XHR requests.Unfortunately, Safari does not like this (in fact, adding withCredentials=true seems to cause CORS issues even outside of the proxy).Origin [REDACTED] is not allowed by Access-Control-Allow-OriginFailed to load resource: Origin [REDACTED] is not allowed by Access-Control-Allow-OriginXMLHttpRequest cannot load [REDACTED, CDN] due to access control checks.Is there anything known about Safari, S3, and CORS issues that may help us here? Our CORS policy has the redacted origin above listed as an allowed origin, so I'm not sure what is happening here (or why withCredentials=true is causing a problem when we are outsid
2
0
8.1k
Jul ’17
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
Dec ’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
Dec ’24
Reply to Instagram login using ASWebAuthenticationSession
Error code 2 here is ASWebAuthenticationSessionErrorCode.PresentationContextNotProvided, because you're not setting the presentationContextProvider on your ASWebAuthenticationSession instance. This method tells the system which window of your app to lay out relative to. Since you're in SwiftUI, there's a separate SwiftUI version of this API which handles the presentation context for you. Also, starting in iOS 17.4, ASWebAuthenticationSession now supports callbacks using https URLs, in addition to custom schemes. Using https callbacks requires you to set up Associated Domains with your callback URL. Putting those two things together would look something like @Environment(.webAuthenticationSession) private var webAuthenticationSession func startInstagramLogin() { ... let callbackURL = try await webAuthenticationSession.authenticate(using: authURL, callback: .https(host: mysite.com, path: /myAuthEndpoint)) ... }
Topic: Privacy & Security SubTopic: General Tags:
Dec ’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
Dec ’24
Reply to WKWebView Challenges while authenticating PIV Certificates
Hi. Thanks for your prompt reply. I am also not concerned about Cordova. I have this new implementation that I need to work on regarding PIV related authentication in WKWebView. Please let me explain the scenario below. A PIV (Personal Identity Verification) card converts to a digital certificate by essentially extracting the cryptographic key pair stored on the card and embedding it into a digital certificate file, which can then be used for authentication and digital signing purposes. I am intending to use it in my iOS app which uses WKWebView and has Okta SSO for SAML Authentication. I am aware that this PIV digital certificate will be stored in iOS device through MDM. There are few questions that I have related to this implementation: As you mentioned that these certificates does not get stored in the form of .p12, then please let me know how and which format do they get stored. How can I use these digital certificates in my app when the SSO asks for authentication through PIV. For POC purposes, I have ad
Topic: Safari & Web SubTopic: General Tags:
Nov ’24
WKWebView Authorization Challenge fails to refresh
I have a url that I want to stream, the stream is protected by basic auth. I am using URLAuthenticationChallenge (wkwebview navigation delegate function) method to provide my credentials. the credential changes with every stream url. The issue I am facing is that URLAuthenticationChallenge is never called upon refresh or on new URL request until the app is killed and opened again. I have tried: clearing cooking setting cache to ignore opening an another blank url using child view approach setting wkwebview instance to nil I always end up with 401 in decidePolicy (wkwebview delegate functions) on subsequent refresh call. Upon inspecting I see that it is using my previous used credentials and never calling challenge to update. *Backend has a no-cache policy in its header. **I am using http resource, the aim is to have streaming service on iOS. class ViewController: UIViewController, WKNavigationDelegate, WKUIDelegate { @IBOutlet weak var wkWebView: WKWebView! override func viewDidLoad() { super.viewDidLoad() le
Topic: Safari & Web SubTopic: General Tags:
1
0
618
Nov ’24