im trying to use ASWebAuthenticationSession to authenticate with a private identity provider.
- Authentication with ASWebAuthenticationSession starts
- Callback with my custom scheme got called
- I need all Cookies of this requests to authenticate the User within my WKWebView. The callback only sends me the url of my custom scheme and not the request.
I can't transfer the Cookies within the url of my custom scheme because i reach the maximum length of url.
ASWebAuthenticationSession doesn't use HTTPCookieStorage to store the Cookies while the authentication?!
session = ASWebAuthenticationSession(url: urlToCall, callbackURLScheme: scheme)
{ callbackURL, error in
let cookie = callbackURL?.absoluteString.split(separator: "=")[1]
print("Session is \(cookie)")
//How to get Cookies here?
}
Does anyone have solutions?