New filters on the Home Feed, take a look!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
React Native - onAuthStateChange shows user is logged out on each refresh?
Post Flair (click to view more posts with a particular flair)
Post Body

So I thought the default for persistence in JavaScript projects was local persistence i.e. staying logged in until officially logged out. But when i refresh the emulator and console.log what onAuthStateChange is doing it shows all the user credentials undefined. Currently I am saving the the uid with AsyncStorage to render the rest of the app but I do not know if this is the proper way to do things.

I tried using setPersistance(browserLocalPersistance) but it was throwing me an error saying it expected a class definition and couldn't find much to fix it. I'm not sure if this method even works for React Native. So any advice would be greatly appreiated

Author
Account Strength
80%
Account Age
2 years
Verified Email
Yes
Verified Flair
No
Total Karma
9,745
Link Karma
1,834
Comment Karma
7,565
Profile updated: 4 days ago
Posts updated: 1 month ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago