Ionic local storage to store user credentials


#1

Hai,

I read about ionic localstorage module lately, and with that, I can store my user credentials, so that next time I open my app I don’t want to type in my user credentials again and again.

But after some reading, I come to know that local storage needs some sort of locking mechanism enabled in the phone beforehand.

say a password lock or something

can I use some storage mechanism in my device so that i can store user credentials even thouigh i dont have a lock in my phone.

thank you


#2

First, are you talking about localStorage or Ionic Storage, as there’s a big difference?

Second, where did you read that it requires a lock?


#3

And storing credentials in a local storage is a security risk.

Better use session tokens etc.


#4

How to use session tokens?

I mean i need the user credentials to be stored on my next visit to the app. session i believe will clear every details after some time.


#5

I am using localstorage.

i tried to save the user login credentials in ionic storage but that was of no use when i open the app yet again. it clears every data and then i started from the very first with the login part


#6

I am really sorry, its not local storage but secure storage.