Hi, I am exploring to use Hive on my flutter web app. Can someone please help me answer/understand the below questions?
Thanks,
Arathi
Where is Hivedb stored on the browser? local storage or session storage?
What will happen if I open my app in multiple tabs? Will the tabs be able to access the data in the Hive?
Please check this StackOverflow post for additional details.
What if I open multiple browser windows?
I think the behavior would be same as opening multiple tabs.
Will the Hive be deleted when I close my tab/window?
No. Unless user clears browser storage.
Thank you for your response, from your experience, do you think it's a good use聽case to use HiveDB to store OAuth tokens on the browser?
Thank you for your response, from your experience, do you think it's a good use聽case to use HiveDB to store OAuth tokens on the browser?
Actually I'm using Flutter for mobile specific tasks only. For web I'm using react instead. But in general I'm using Hive to store OAuth tokens on device. Previously I was creating json file manually but sometimes weird things occurred and I did not wanted to deal with File System issues.
But I think the answer is: it depends. The best practice might not work for someone else because he/she might have additional requirements. Also if it works for you just use it.
I guess you should use shared preference along with any encrypt algorithm
@arathiShankri