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

fix: use app documents directory to store the user token if possible #88

Merged
merged 9 commits into from
Jul 17, 2023

Conversation

VladislavFitz
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Related Issue Fix #84
Need Doc update no

Describe your change

This pull request introduces the utilization of the path_provider package to enable access to the application documents directory on iOS, Android, macOS, Linux, and Windows platforms. By incorporating this package, we can ensure a consistent and secure storage location for user tokens.

What problem is this fixing?

Unhandled FileSystem exceptions on some platforms (iOS) while trying to store the persistent user token

@VladislavFitz VladislavFitz requested a review from aallam June 23, 2023 14:30
Copy link
Member

@aallam aallam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice Job!

insights_dart/lib/src/user_token_storage.dart Outdated Show resolved Hide resolved
Copy link
Member

@aallam aallam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is perfect! Nice job!
By the way, if in the future isWeb is used in more than one place, we could refactor the import logic into another file. However, for now, it's good as it is. :)

@nerder
Copy link

nerder commented Jul 5, 2023

What's preventing this PR from being merged? Also, I think it should close mine as soon as this is merged as it aims to fix the same issue.

@VladislavFitz
Copy link
Contributor Author

VladislavFitz commented Jul 12, 2023

@nerder it's blocked because path_provider library requires Flutter as dependency while Insights is a pure Dart library. We are still deciding how to proceed, most likely the Insights library will become the Flutter library. The release will be soon.

@VladislavFitz VladislavFitz merged commit d2dfcc4 into main Jul 17, 2023
@VladislavFitz VladislavFitz deleted the fix/unhandled-filesystem-exception branch September 8, 2023 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants