Tecnico
Tecnico

Reputation: 459

Remember user and password in my Ionic APP

I have a problem because in my app I need to put a login and password to access and when I access and press physical button return of my smartphone and I leave my app, if I access appear again login page so... my app don't remember user and password. Somebody know how can I solve it? Thanks in advance.

Best regards.

Upvotes: 2

Views: 6595

Answers (2)

Wilt
Wilt

Reputation: 44373

Your app shouldn't remember username and password. Your app should remember an access token (and refresh token) or similar and you could autofill the username and password when your token (or refresh token) expired.

If you use Capacitor you can check the implementation guide for autofilling credentials here:

https://capacitorjs.com/docs/guides/autofill-credentials

Upvotes: 0

Mr.Floppy
Mr.Floppy

Reputation: 348

Just use nativeStorage from ionic-native:

https://ionicframework.com/docs/v2/native/nativestorage/

Upvotes: 5

Related Questions