-
Notifications
You must be signed in to change notification settings - Fork 70
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
How to Clear Cookies in Flutter Custom Tabs? #227
Comments
Hi, Your current approach using WebView methods won't clear cookies in the custom tabs browser, Unfortunately, clearing cookies for Custom Tabs is platform-specific and has limitations:
Consider using webview_flutter for more granular control over web views and cookie management. |
Hi @droibit, Thanks for your response. I tried webview_flutter and flutter_inappwebview, but neither of them showed the already-signed-in account when I tried Google sign-in. Every time you try to log in, it will ask for your password and email address. I tried using flutter_custom_tabs for that. Are there any other options for showing Google accounts when using flutter_inappwebview or webview_flutter? |
@GowthamanRavichandran3 However, when implementing Google sign-in in Flutter, you might consider using authentication packages like these: |
Hi @droibit, I am using CustomTabsIntent from the native method instead of flutter_custom_tabs to launch a URL in my Android app. Is there a way to clear cookies when using CustomTabsIntent? I want to ensure the browser session starts fresh without retaining any previous cookies or login information. How can I achieve this? Below is the code snippet I used:
|
Unfortunately, For more specific guidance on managing cookies in your use case, I will close this issue for now. |
I am using the flutter_custom_tabs package to open a URL in my Flutter app. I need to clear the cookies stored in the browser when the custom tabs browser is closed.
I used a native method (Kotlin for Android, swift for iOS) to clear cookies, but it didn’t work as expected. Although the native scripts executed correctly when called from Flutter, the cookies in the custom tabs browser remained uncleared.
Below is the native code I used:
Android:
iOS:
Is there a way to clear the cookies of the browser opened with flutter_custom_tabs? Or is there any workaround or alternative solution to achieve this functionality?
The text was updated successfully, but these errors were encountered: