Closed NilouMinooei closed 2 months ago
in android
intentFlags: ephemeralIntentFlags
does not actually close the session and only closes the open tab so the cookies are available.
This is expected and behaving as it should since this is not how ephemeral sessions work on Android. This is also actually the reason why I made the intent flags completely customisable: ephemeralIntentFlags
now simulate what an ephemeral session on Android was like before - and the rest is up for the developer to decide and configure.
I need the session to be completely closed + getting rid of all the cookies.
This is the same issue as #66 and #114. Basically, nothing this package can do about it. If you want the user to log out, invalidate the cookies on the server end.
And if you don't have any access to some mechanism like that: Call authenticate
again, but point it to the log out endpoint of the web application you originally authenticated against. Be sure to somehow catch going back to the app, though (which can be rather tricky).
or a feature like opening the web in incognito so that there would be no cookies after closing the session.
I am not sure if there is any API that would allow this in Android. I actually rather doubt it.
Thanks a lot for your complete answer and suggestions. I'll have them in mind.
Is your feature request related to a problem? Please describe.
I'm using Flutter_web_auth_2 for login process and it comes back to app with a special scheme. when you first install the app, you redirect to page, add your credentials and then after finishing successfully you redirect to app and everything is fine. now if you log out and want to log in again it does not let you enter any credentials and logs you in automatically. this part is fixed vial
preferEphemeral: true
for ios but in androidintentFlags: ephemeralIntentFlags
does not actually close the session and only closes the open tab so the cookies are available.Describe the solution you'd like
I need the session to be completely closed + getting rid of all the cookies.
Describe alternatives you've considered
or a feature like opening the web in incognito so that there would be no cookies after closing the session.
Additional context
flutter doctor -v
version of the flutter_web_auth_2: 3.1.2
note: about a month ago it used to work with the same version and it would open a new web every time. But recently something must have changed somewhere. I have searched a lot in all the dependencies but I could not find any different. I'm just mentioning it maybe you would have an idea about it 😅