简体   繁体   中英

I am getting this error when trying to login using react native and firebase

I am getting the following error when clicking the log in button. I am not getting any errors inside VSCode..so it appears everything is correct with firebase code. Any suggestions.. I am stuck. 在此处输入图像描述

AsyncStorage was deprecated by react-native (see: https://reactnative.dev/docs/asyncstorage ).

Check out this thread for details on using firebase with an alternative storage provider: https://github.com/firebase/firebase-js-sdk/issues/1847 . More specifically, according to this post, you should use auth like so:

// Import it from your preferred package.
import AsyncStorage from '@react-native-async-storage/async-storage';

// Provide it to initializeAuth.
const auth = initializeAuth(app, { persistence: getReactNativePersistence(AsyncStorage) });

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM