TheM4hd1 / SwiftyInsta

Instagram Private API Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LoginWebViewController can't login, no return sessionid

tomtao2022 opened this issue · comments

right now
instagram cookie return , no return sessionid

private func tryFetchingCookies() {
configuration.websiteDataStore.httpCookieStore.getAllCookies { [weak self] in
let data = $0.filter({ $0.domain.contains(".instagram.com") })
let filtered = data.filter {
($0.name == "ds_user_id" || $0.name == "csrftoken" || $0.name == "sessionid")
&& !$0.value.isEmpty
}
debugPrint("$0 = %d", $0.count)
guard filtered.count >= 3 else { return }. /// ### can't login

i try to login with instagram official website https://www.instagram.com/,, can't login also

return below

▿ 6 elements

  • 0 : <NSHTTPCookie
    version:1
    name:csrftoken
    value:3Kit800Pj4Ey1BMF5KCvCsFujyp2Gdla
    expiresDate:'2023-07-29 03:38:40 +0000'
    created:'2022-07-30 03:38:40 +0000'
    sessionOnly:FALSE
    domain:.instagram.com
    partition:none
    sameSite:none
    path:/
    isSecure:TRUE
    path:"/" isSecure:TRUE>
  • 1 : <NSHTTPCookie
    version:1
    name:mid
    value:YuSmagAAAAFkxbivRELDJiWhrK8j
    expiresDate:'2024-07-29 03:32:59 +0000'
    created:'2022-07-30 03:32:59 +0000'
    sessionOnly:FALSE
    domain:.instagram.com
    partition:none
    sameSite:none
    path:/
    isSecure:TRUE
    path:"/" isSecure:TRUE>
  • 2 : <NSHTTPCookie
    version:1
    name:ig_did
    value:6739B36D-7432-402A-AEEF-24AB15163C44
    expiresDate:'2024-07-29 03:32:59 +0000'
    created:'2022-07-30 03:32:59 +0000'
    sessionOnly:FALSE
    domain:.instagram.com
    partition:none
    sameSite:none
    path:/
    isSecure:TRUE
    isHTTPOnly: YES
    path:"/" isSecure:TRUE isHTTPOnly: YES>
  • 3 : <NSHTTPCookie
    version:1
    name:ig_nrcb
    value:1
    expiresDate:'2023-07-30 03:32:59 +0000'
    created:'2022-07-30 03:32:59 +0000'
    sessionOnly:FALSE
    domain:.instagram.com
    partition:none
    sameSite:none
    path:/
    isSecure:TRUE
    path:"/" isSecure:TRUE>
  • 4 : <NSHTTPCookie
    version:1
    name:rur
    value:"EAG\0544155893031\0541690688258:01f7fe68b9a7e19aa386bb32579ea0df517fe73d5c7eb69d36404b1f8969d6903bd40df8"
    expiresDate:'(null)'
    created:'2022-07-30 03:37:38 +0000'
    sessionOnly:TRUE
    domain:.instagram.com
    partition:none
    sameSite:none
    path:/
    isSecure:TRUE
    isHTTPOnly: YES
    path:"/" isSecure:TRUE isHTTPOnly: YES>
  • 5 : <NSHTTPCookie
    version:1
    name:ds_user_id
    value:4155893031
    expiresDate:'2022-10-28 03:37:38 +0000'
    created:'2022-07-30 03:37:38 +0000'
    sessionOnly:FALSE
    domain:.instagram.com
    partition:none
    sameSite:none
    path:/
    isSecure:TRUE
    path:"/" isSecure:TRUE>

(lldb) po filtered
▿ 2 elements

  • 0 : <NSHTTPCookie
    version:1
    name:csrftoken
    value:3Kit800Pj4Ey1BMF5KCvCsFujyp2Gdla
    expiresDate:'2023-07-29 03:38:40 +0000'
    created:'2022-07-30 03:38:40 +0000'
    sessionOnly:FALSE
    domain:.instagram.com
    partition:none
    sameSite:none
    path:/
    isSecure:TRUE
    path:"/" isSecure:TRUE>
  • 1 : <NSHTTPCookie
    version:1
    name:ds_user_id
    value:4155893031
    expiresDate:'2022-10-28 03:37:38 +0000'
    created:'2022-07-30 03:37:38 +0000'
    sessionOnly:FALSE
    domain:.instagram.com
    partition:none
    sameSite:none
    path:/
    isSecure:TRUE
    path:"/" isSecure:TRUE>

Hey @{{ author }},

This repo is not currenlty maintained, and it's to be considered as read-only: issues, such as this one, will not be fixed.
Please refer to #244 for more info.

Check out Swiftagram if you're looking for up-to-date alternatives to SwiftyInsta.