Best way to save access token (localstorage vs sqlite)

Hi!

I’ve noticed that my app in ios is erasing the localstorage randomly and is where i’m saving the access token so the user is logout…

What is the best method? LocalStorage or SQLite? Is there any tutorial to storage this kind of data in sqlite?

Thanks!!

Android -> SharedPreferences
iOS -> keychain

and a universal method?

Thanks!

=> localStorageService.set(‘authorizationToken’, data.authorizationToken);

See: http://robferguson.org/2015/07/27/authentication-for-ionic-apps/