-
-
Save xxxxlr/475bd734fe49d776370633461164c361 to your computer and use it in GitHub Desktop.
Not working. _onMessage is never called. Anyone got it working? please reply.
@yasserzubair sometimes a short delay is needed, setTimeout(() => window.postMessage(document.cookie), 0)
works every time
It's won't work if HttpOnly flag for cookie been provided
const jsCode = 'window.ReactNativeWebView.postMessage(document.cookie)';
This will work everytime.
@Rohitsaxena THANK YOU SO MUCH.
I tought my app was over, but you saved me, you solution worked
Btw thx @xxxxlr, without your gist nothing would've come
Hey, small issue I encountered, why the code returns only ~30% of the actual cookies?
encountered the same issue, it doesn't return complete cookies
the output is something like below:
["okta-oauth-nonce=wTMKiRCNxXPV8ooXPQ0pYLtlbvlzfV0SsjeH4s9NpquArJjzWu9ZbUl6es4deVyb", " okta-oauth-state=X5AKl6fUj3hGDFf3BsGsnzxyXyMhuuc73lsvzYZHy5s8viUbZ8fUjNIZVJsMMxhs", " ln=[email protected]"]
It's won't work if HttpOnly flag for cookie been provided
+1
injectedJavaScript is working