Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoginWebViewController can't login #239

Closed
tomtao88888 opened this issue Feb 13, 2021 · 5 comments
Closed

LoginWebViewController can't login #239

tomtao88888 opened this issue Feb 13, 2021 · 5 comments

Comments

@tomtao88888
Copy link

let login = LoginWebViewController { controller, result in
controller.dismiss(animated: true, completion: nil)
// deal with authentication response.
guard let (response, _) = try? result.get() else { return print("Login failed.") }

return "Login failed.

@tomtao88888
Copy link
Author

ios 13
sometimes return "Invalid Authentication.Response
sometimes return login successful

@tomtao88888
Copy link
Author

tomtao88888 commented Feb 15, 2021

sometimes web login return "Invalid Authentication.Response, i tracked , in here
I guess web cookies not return because of network speed
any idea ?

case .success(let instagramCookies):
let data = instagramCookies.filter({ $0.domain.contains(".instagram.com") })
let filtered = data.filter { $0.name == "ds_user_id" || $0.name == "csrftoken" || $0.name == "sessionid" }
guard filtered.count >= 3 else {
return handler.settings.queues.response.async {
completionHandler(.failure(GenericError.custom("Invalid Authentication.Response response.")))
}
}

@tomtao88888
Copy link
Author

sometimes instagramCookies just return csrftoken
not ds_user_id and sessionid
any idea?

@borisdipner
Copy link

R u trying to login on simulator?

@sbertix
Copy link
Collaborator

sbertix commented Mar 11, 2021

Hey @tomtao88888 and @borisdipner,
please refer to #244 about the future of SwiftyInsta.

@sbertix sbertix closed this as completed Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants