reactfire icon indicating copy to clipboard operation
reactfire copied to clipboard

Cannot get auth flow working correctly with persistence.

Open MWTuttle opened this issue 1 year ago • 0 comments

Version info

React: 18.2.0

Firebase: 10.7.1

ReactFire: 4.2.3

Expo: 50.0.15

Other (e.g. Node, browser, operating system) (if applicable):

Test case

I'm trying to setup the AuthProvider with an auth object to initialize it. If I use 'getAuth(app)' I get a warning that says I'm using authentication without persistence and says I should use:

initializeAuth(app, { persistence: getReactNativePersistence(AsyncStorage), });

If I use that though, I get a firebase error saying auth is already initialized ('auth/already-initialized').

MWTuttle avatar Apr 14 '24 12:04 MWTuttle