Persistence of firebase auth on Ionic 4 App



I’m creating a hybrid app with Ionic 4 and using Firebase to authentication. However, I don’t know how to set persistence for this authentication so the user can login in app just one time and his session will always be saved until him logout.

Anyone knows how to set persistence for this authentication?

Thank you


See: Authentication State Persistence

1 Like

I saw that before, but this works even if I build for Android? I also saw a ionic native plugin for this task and tried that, but didn’t work.


You can specify how the Authentication state persists when using the Firebase JS SDK. This includes the ability to specify whether a signed in user should be indefinitely persisted until explicit sign out, cleared when the window is closed or cleared on page reload.

Also, see: The official Angular library for Firebase


Thank you! I was using the wrong function to check persistence. A deep reader on these links helped me.