igpapi — Instagram private API Simulator for Node.js (API reference) 4.19.0
    Preparing search index...

    Function adoptLoginAnswer

    • What a login answer teaches the session: the one function every login path (the Bloks login, the native login and its two-factor step, the recovery nonce login, the one-tap app login) calls with the answer's logged_in_user. A login is a new account's facts, so an answer with no fbid_v2 clears the previous account's id instead of leaving it.

      A login also starts a new account's user session, and everything the previous user session kept dies with it: endUserSession runs the resets its process-state owners registered, and MobileSessionState.profileInfoFetches and MobileSessionState.profileFollows — the response caches the session itself carries — are reset here, the one place a login adopts an account. A fact kept by account (accounts) is not reset: it is stored under its account's id, so the next account's lookups never see it and the first account gets it back when it returns.

      With adoptLaunchFbidV2 these are the only writers of MobileSessionState.fbidV2 (a source scan test fails on any other assignment).

      Parameters

      Returns void