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

Store cookies after application exit? #72

Closed
rizkyputrapb opened this issue Jun 3, 2022 · 4 comments
Closed

Store cookies after application exit? #72

rizkyputrapb opened this issue Jun 3, 2022 · 4 comments
Labels
question Further information is requested

Comments

@rizkyputrapb
Copy link

rizkyputrapb commented Jun 3, 2022

Hi, I just want to ask if the current version stores the cookies even after the application exits? or should I use shared preferences to store the cookies and then set the cookies when opening the app again? thanks!

@sehnryr sehnryr added the question Further information is requested label Jun 3, 2022
@sehnryr
Copy link
Collaborator

sehnryr commented Jun 3, 2022

From version 4.3.0 onward, requests will not store cookies in the local storage by itself. Then, to store the cookies, you could use whatever storage system that suits you the best.

@sehnryr
Copy link
Collaborator

sehnryr commented Jun 3, 2022

Since cookies should not store sensitive data, it's safe to use shared preferences.

There was quite the debate in issue #1 to chose a secured system to store the cookies, but in the end, since cookies should not handle sensitive data, there is no need to have a better and more secure way to score cookies compared to modern browsers, and I also concluded that it would be too restrictive to impose to the end user a storage system only for cookies.

@sehnryr sehnryr closed this as completed Jun 3, 2022
@philippkeller
Copy link

So the current implementation does not store cookies when the app ist closed, right? So I would need to store the cookie myself. Based on the debate on #1 you consider it still safe to use shared_preferences for this, right?

@sehnryr
Copy link
Collaborator

sehnryr commented Jun 19, 2022

@philippkeller Since 4.3.0 requests will not store cookies by itself. This allows the user to have more control on how he wants to handle the cookies. And I don't think there is any problem with using shared_preferences or any other storage system if the cookies you are trying to save follow the simple rule of not storing sensitive data.

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

No branches or pull requests

3 participants