prescottprue / react-redux-firebase

Redux bindings for Firebase. Includes React Hooks and Higher Order Components.
https://react-redux-firebase.com
MIT License
2.55k stars 559 forks source link

CreateUser function only works on chrome not safari with exact same code. #1177

Closed glynnallen1704 closed 2 years ago

glynnallen1704 commented 2 years ago

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

In my project i'm using

this.props.firebase.createUser({ email: 'foobar@foobar.de', password: 'admin' }, { firstname: 'Foo', lastname: 'Bar' }) to create an account, everything works fine, the user gets created - instant login and the flow works - except the adding of the second props object.

I inject the firebase object into the component with withFirebase

I configured userProfile and useFirestoreForProfile in the store:

const reactReduxFirebaseConfig = { enableLogging: true, logErrors: true, autoPopulateProfile: true, userProfile: 'users', setProfilePopulateResults: true, useFirestoreForProfile: true, enableClaims: false, attachAuthIsReady: true, };

im using "react-redux-firebase": "^3.10.0"

What is the expected behavior? Should create the profile object on the users document.

This all works perfectly on Chrome but as soon as i use Safari the object is never passed through and i cant see any logging errors. I have also tried adding a catch to the promise but nothing is caught.

glynnallen1704 commented 2 years ago

This seems to be relates to persistence being enabled on firestore. If i remove enablePersistence() then Safari can handle this function.