-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
clearCookies()is not clearing the cache and cookies on iOS #173
Comments
I have the same use case as you where I need the cookies/cache to clear for an authentication flow in iOS. I was able to get them to clear by changing the clearCookies function in the InAppBrowserPlugin.swift file to the following:
Not sure if this solution matches what the developers of this plugin intend this function to do, so I don't know if they will want to implement this change. But it works for what I need it to do, and sounds like it should work for you as well. |
The workaround you provided to fix the clearCookie function issue on iOS is greatly appreciated, @Anthony-Matheou . Let me attempt the same thing. |
Ok the clearCookie was a big mess since a while. |
I am using the plugin to load the login webpage in my app:
Application is opening the login url with method
InAppBrowser.openWebView()
.Before opening the web view I am calling
InAppBrowser.clearCookies({url: authUrl, cache: true})
Once the login is success I am calling the InAppBrowser.close() methods and clearing all browser listeners by invoking the method
InAppBrowser.removeAllListeners()
from the “closeEvent” listener method.But the clearCookies() is not clearing the cache and cookies in the iPhone devices. As the cookies and cache are not clearing properly, the session is not cleaned up and user is able to enter the app without login.
ionic 8.x
Angular 16/18
capacitor 5.x
iOS 15+
The text was updated successfully, but these errors were encountered: