Building in react native and finding it tricky to have an automatic sign-in flow to the app, that once a user signs in, firebase remembers the user just like the JWT but using persistence.
If I use the code below, the line
firebase.auth().setPersistence(firebase.auth.Auth.Persistence.LOCAL); gives an error in the terminal when I try sign in. [TypeError: undefined is not an object (evaluating 'this.storage.setItem')]

I have tried to also place the setPersistance within other areas of the app but it seems I have some issue not understanding how the implementation is done correctly. I have the
onAuthStateChanged checking users within the Navigation file.