Skip to content
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

Profile not populated with with "users" collection in firestore #1079

Open
sbodrero opened this issue Mar 31, 2021 · 1 comment
Open

Profile not populated with with "users" collection in firestore #1079

sbodrero opened this issue Mar 31, 2021 · 1 comment

Comments

@sbodrero
Copy link

sbodrero commented Mar 31, 2021

What is the current behavior?
Hi, as my config is describe under i want firebase profile to populate with my "users" collection from firestore:

const rrfConfig = {
  useFirestoreForProfile: true, // Firestore for Profile instead of Realtime DB
  userProfile: 'users', // firebase root where user profiles are stored
  logErrors: false,
  enableLogging: true, // enable/disable Firebase's database logging
  fileMetadataFactory: (uploadRes, firestore, metadata, downloadURL) => {
    // upload response from Firebase's storage upload
    const { metadata: { name, fullPath } } = uploadRes;
    // default factory includes name, fullPath, downloadURL
    return {
      name,
      fullPath,
      downloadURL
    };
  }
};

const rrfProps = {
  firebase,
  config: rrfConfig,
  dispatch: store.dispatch,
  createFirestoreInstance, // <- needed if using firestore
};

const Root = () => (
  <Provider store={store}>
    <ConnectedRouter store={store} history={history}>
      {/* eslint-disable-next-line react/jsx-props-no-spreading */}
      <ReactReduxFirebaseProvider {...rrfProps}>
        <App />
      </ReactReduxFirebaseProvider>
    </ConnectedRouter>
  </Provider>
);

What is the expected behavior?

my profile state only shows isEmpty(pin):true isLoaded(pin):false

I use RRF in an other project with the same config and it works :-/

Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?

"react-redux-firebase": "^3.10.0",

Really really thank you forward

@choipd
Copy link

choipd commented Apr 17, 2021

Have you set useFirestoreForStorageMeta: true in rrfConfig?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants