IGPAPI
    Preparing search index...

    Function buildUsdidJws

    • Builds the flattened JWS sent as usdid_token.sensitive_string_value in IGUSDIDRegistrationMutation.

      Encoding quirks observed on real Instagram Android traffic:

      • The outer envelope is the flattened JSON JWS ({payload, signatures:[…]}), then the whole envelope is itself base64url-encoded (a non-standard outer wrap).
      • The ECDSA signature is DER-encoded (71 bytes), NOT the JWS-standard raw R||S concatenation (which would be 64 bytes).

      Parameters

      • input: { aud: string; iat?: number; identity: UsdidIdentity; ttlSeconds?: number }

      Returns string