ig: add support for login and push notifications with android API - #361
Conversation
|
@highesttt can you test this out as well please? Isn’t this the login flow that wasn’t giving cookies that worked with the rest of the bridge (mobile only cookies or something)? |
Select the captured TLS profile from native login state, use the normal gateway for native streams, and restore the shared login request retries.
| Msg("Captured Instagram web two-factor challenge") | ||
| if info.EncryptedContext != "" && (method == "SMS" || method == "WHATSAPP") { | ||
| if err := c.sendInstagramWebTwoFactorCode(ctx, c.webTwoFactor); err != nil { | ||
| return nil, err |
There was a problem hiding this comment.
Was this something actually missing from the web login code, or was it just for the mixed native+web login thing that was removed? (also are there any other leftovers of that mixed login flow?)
It was missing from web login too. I found it during the mixed-flow work, but Instagram’s website makes a separate request to send the first SMS. We were showing the code field without making that request, so that fix stays. There were leftovers I should have removed. Those are gone now.
I kept them after switching to the generated decoder and missed that the surrounding DGW handler already catches decoding failures and reconnects. I removed the whole wrapper. It now uses the generated decoder directly.
Agreed and done. |
|
I renamed the new login flow to Everything mostly looks good now, but @highesttt should also review the login parts |
highesttt
left a comment
There was a problem hiding this comment.
Looks reasonable, tested on multiple accounts from different countries, works well
Add a native Instagram login flow that uses one session for messages and push notifications. The flow is available for both cloud and on-device connections.
Validation includes a fresh Android login, self-hosted login and restart, sending and receiving with native sessions, and background notifications on Android and iOS. Fresh iOS setup remains unverified because the SMS never arrived. A fresh install of Instagram's own Android app reproduced that nondelivery too.
Rollout requires enabling
instagram-nativefor the cloud and local login flows.Related: SDK update · req receive-window fix