-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to update value of already set cookie in WebView #168
Comments
hello @karel-suchomel-ed do you have this issue on iOS ? Android ? Both ? |
I found that if you do not specify the |
Hi, thank you for your response, mainly this is happening on iOS, I have managed to get it working, but I struggle with a different problem. After I set the cookie and load the webview, on the initial page load the session is still not working, but after I redirect it starts working correctly. Do you have any idea, what can be the problem? Also, it works when I hard-code a webview reload after 500ms after load, but it is not a good solution. I tried combining it with the headers attribute in source prop, where I also passed the PHPSESSID in Cookie header and it works even strangely. The session is there after the initial page load, but after I redirect it doesn't work and after I redirect again, it works again :D Any suggestions are welcome. I call this method after retrieving the access token after app startup if the user is already logged in or after login.
Then this is the webview.
|
Are you setting the cookie and then load the webview? Maybe you are setting the cookie a little bit too late? |
Hallo! I am actually having this issue in Android! Cookie value does never update I call this function on a useEffect to set the first url to a Webview (component will only render when first url is set) and when webview But still i was expecting that the cookie value in Android would be replaced on set, but maybe i am wrong? It's been hard to test this since my local builds always replace the cookie value, but not the build in production
I am using this cookies agnostic to the domain! Because they can be shared among multiple domains. But that does not reflect in some Android running in production:
|
Hello,
I'm using this library to set a session cookie PHPSESSID in WebView. My app has an e-shop on a website which I'm displaying in WebView and to "share" the user session from the app to WebView I'm using an auth token. When I try to set the PHPSESSID cookie in a browser manually it works as expected, but in a WebView the cookie is not getting updated.
I'm settings this cookie on the browser mount in useEffect and before every page load like this.
When I try to set any random test cookie I can see that it is set correctly the first time, but after it already exists its value cannot be updated.
Has anyone experienced the same issue or does anybody know, whether or not it is possible to update the PHPSESSID cookie in webview?
The text was updated successfully, but these errors were encountered: