appwrite / sdk-for-android

[READ-ONLY] Official Appwrite Android SDK 💚 🤖
https://appwrite.io
BSD 3-Clause "New" or "Revised" License
98 stars 21 forks source link

🐛 Bug Report: Persistent login is broken on Android 12 #20

Closed zlmr closed 2 years ago

zlmr commented 2 years ago

Appwrite Android SDK uses cookies to achieve persistent login and store user session. More specifically it uses https://github.com/gotev/android-cookie-store library to store cookies.

But as is mentioned in https://github.com/gotev/android-cookie-store/issues/28 storing cookies does not work anymore on Android 12 and most likely support for it will just go downhill from now on due to Google policies.

I am aware that this should be handled in Android Cookie Store library, but since safest way to tackle this is to migrate away to proper token authentication and not use library at all - I am leaving this here.

At the moment it is not possible to use Appwrite Android SDK with Android 12. As soon as the app is closed, session is lost and you would have to login again and again.

gotev commented 2 years ago

I am aware that this should be handled in Android Cookie Store library, but since safest way to tackle this is to migrate away to proper token authentication and not use library at all - I am leaving this here.

Absolutely. Cookies are legacy stuff and Android Cookie Store is meant as a legacy container library, which hopefully could be dropped in the future when Cookie authentication gets finally abandoned 😉 Thanks to @abnegate now version 1.5.0 has been released, so you should have your problem fixed!

zlmr commented 2 years ago

Awesome! Thank you all for great work 💪