Could you not just pass the cookie data to the iframe after it has loaded with postMessage()?
postMessage()