DEV Community

Discussion on: local storage Use

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀 • Edited

May I suggest indexdb via pouchdb framework. Please consider reading this excellent dev.to post on the subject.

Article: Linky

Pouchdb: pouchdb.com

Collapse
 
ajaydeveloper profile image
AjayMalhotra

Good information.

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀 • Edited

Been in your shoes, only difference, I wasn't brave enough to ask. That post should help you weigh it up. I have sebtled on encrypted user data stored in index dB but making sure it invalidates on browser close. Anything else like names and credit cards I'd store in Couch server side then sync.

Thread Thread
 
ajaydeveloper profile image
AjayMalhotra

Can I use local-storage to use usernames.
I also heard session storage kind of thing in JavaScript.
Anyways thank you

Thread Thread
 
adam_cyclones profile image
Adam Crockett 🌀 • Edited

Depends,

Are the user names email addresses?

by allowing usernames to be stored, you make the attackers job easier by doing 50% of the work for them. however, if when you auth, you have 3 credentials. username, date of birth (dont use this its easy to get DOB) and password then you could store usernames with no real impact?

Thread Thread
 
ajaydeveloper profile image
AjayMalhotra

Okay good