I was wondering since I don't find the answer online, where or "how" is the firebase user session (using auth()
) stocked in React Native ?
I know it's open source but I can't find what I want. If possible I would like to know the location/way for both ios and android.
CodePudding user response:
In browser based environments, Firebase Authentication stores the user credentials in local storage, and restores them from there when the page reloads.
In native Android environments, Firebase Authentication stores the user credentials in the shared preferences of the app, and restore them from there when the app reloads.
In native iOS environments, Firebase Authentication stores the user credentials in the user's keychain, and restore them from there when the app reloads.
If you need to control the storage of the user credentials in a JavaScript environment, check the documentation on auth state persistence to learn about your options.