Skip to content
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

Browser remembers my credentials, so I have to clear browser cache #144

Open
adminant opened this issue Nov 5, 2022 · 7 comments
Open

Comments

@adminant
Copy link

adminant commented Nov 5, 2022

Hi, I have a problem with login in Android. When I login 2nd time and after, I automatically pass on without login/password prompt, so if I want to change user, I have to run Chrome browser from Android desktop and choose Clear browsing data from its Settings. I know there is preferEphemeral flag, but it works only in iOS.

@LinusU
Copy link
Owner

LinusU commented Nov 6, 2022

preferEphemeral is implemented on Android as well, is it not working?

if (preferEphemeral) {
intent.intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY)
}

@adminant
Copy link
Author

adminant commented Nov 8, 2022

preferEphemeral is implemented on Android as well, is it not working?

Unfortunately not. Login process is based on cookies, and I have to clear browsing data in Chrome everytime for other login/password to work. In iOS everything works as expected.

@adminant
Copy link
Author

Any ideas? How must that no_history flag work? I think for this mode we must run some kind of clear session of browser without cookies, don't use old cookies and don't save new ones. Is this possible?

@LinusU
Copy link
Owner

LinusU commented Nov 18, 2022

I'm not familiar with how the native Android side works, but if you can show me how to make it work with native Android code I'd be happy to incorporate it into this library...

@sebkoller
Copy link

sebkoller commented Nov 20, 2022

The intent flag is for the Android intent, not for the custom Chrome tab: [1]

If set, the new activity is not kept in the history stack.

There seems to be a way to open an incognito tab [2], but that option might not be available by default and must be enabled with a flag in Chrome. I haven't tested this myself.

[1] https://developer.android.com/reference/android/content/Intent#FLAG_ACTIVITY_NO_HISTORY
[2] https://stackoverflow.com/questions/66443545/how-can-i-start-chrome-custom-tabs-in-incognito-mode

@fras2560
Copy link

fras2560 commented Mar 9, 2023

@adminant where you able to resolve this issue?

@adminant
Copy link
Author

@adminant where you able to resolve this issue?

I was able to get rid of this cookies problem only with help of our back-end team. They changed server-side logic. Unfortunately, I could do nothing on mobile app side only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants