Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Auth state needs to be persisted with Local Storage #73

Closed
Aidasvenc opened this issue Apr 15, 2024 · 1 comment · Fixed by #117
Closed

Auth state needs to be persisted with Local Storage #73

Aidasvenc opened this issue Apr 15, 2024 · 1 comment · Fixed by #117
Assignees

Comments

@Aidasvenc
Copy link
Collaborator

          Overall LGTM, I tested everything on my machine and my android. There is just a warning at launch, but it's not related to a screen but rather the firebase/auth package.
WhatsApp Image 2024-04-15 at 13 08 42_7a28827a

This warning does not prevent the app from functioning correctly, I suggest we address it in another PR.

Originally posted by @GaelCondeLosada in #71 (review)

@Aidasvenc
Copy link
Collaborator Author

Aidasvenc commented Apr 15, 2024

You are initializing Firebase Auth for React Native without providing
AsyncStorage. Auth state will default to memory persistence and will not
persist between sessions. In order to persist auth state, install the package
"@react-native-async-storage/async-storage" and provide it to
initializeAuth:

import { initializeAuth, getReactNativePersistence } from 'firebase/auth'; import ReactNativeAsyncStorage from '@react-native-async-storage/async-storage'; const auth = initializeAuth(app, {persistence: getReactNativePersistence(ReactNativeAsyncStorage)});

@GustaveCharles GustaveCharles linked a pull request Apr 16, 2024 that will close this issue
4 tasks
@GustaveCharles GustaveCharles self-assigned this Apr 20, 2024
@Aidasvenc Aidasvenc linked a pull request Apr 23, 2024 that will close this issue
4 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
2 participants