-
Notifications
You must be signed in to change notification settings - Fork 927
FR: Async Storage has been extracted from react-native core #5953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This should already be fixed in How are you initializing the SDK? |
We can solve it by importing the latest
|
@Befkadu1 please try manually initializing the SDK using this function: firebase-js-sdk/packages/auth/src/platform_react_native/persistence/react_native.ts Line 35 in 6555aa7
initializeAuth(app, {
persistence: getReactNativePersistence(/* your library */);
}); |
@sam-gc it looks it works with this
I have no idea with this one |
Your snippet will not have persistence (it will just use in-memory). For example: // This is from your snippet up above:
import AsyncStorage from "@react-native-async-storage/async-storage";
import {getReactNativePersistence, initializeAuth} from 'firebase/auth/react-native';
initializeAuth(app, {
persistence: getReactNativePersistence(AsyncStorage);
}); See also: #1847 Unfortunately we don't have any documentation about this at the moment; it's a relatively recent fix/update. |
I'll look into making sure |
@sam-gc Thanks a lot, it works awesome |
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Steps to reproduce:
Relevant Code:
AsyncStorage will be removed from react-native core in the future release. It should be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. One of the issues is created here
See https://github.com/react-native-async-storage/async-storage for more information regarding AsyncStorage. Here the warning log is attached below.

// TODO(you): code here to reproduce the problem
The text was updated successfully, but these errors were encountered: