React-redux-firebase: bug(profile): provider login not creating user profile

Created on 29 Jan 2019  路  7Comments  路  Source: prescottprue/react-redux-firebase

Bug

What is the current behavior?

Logging in using this.props.firebase.login({provider: 'google', type: 'redirect'}); does not create a user profile in firestore. Using E-Mail & Password with the same config and environment does create user profiles.

My Config:

export const reduxFirebaseConfig = {
    useFirestoreForProfile: true,
    userProfile: 'users',
};

firebase.initializeApp(firebaseConfig);
firebase.firestore();

export const rrfProps = {
    config: reduxFirebaseConfig,
    createFirestoreInstance,
    dispatch: store.dispatch,
    firebase,
};

<ReactReduxFirebaseProvider {...rrfProps}>
   ...
</ReactReduxFirebaseProvider>

Firestore Security Rules :
Set to 'Allow All' for debugging purposes

service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if true;
    }
  }
}

What is the expected behavior?

User profile should be created upon logging in with a Provider.

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

Mac OS, Chrome Version 71.0.3578.98 (64bit)

"firebase": "^5.8.0",
"react-redux-firebase": "^3.0.0-alpha.6",
"redux-firestore": "^0.6.3",
"redux": "^4.0.1",
"react": "^16.5.1",
"react-dom": "^16.5.1",

Related: https://github.com/prescottprue/react-redux-firebase/issues/33

bug

All 7 comments

Thanks for reporting! I'll look into trying to replicate. Not sure it would impact anything, but you may want to try using the new version of redux-firestore available from the alpha tag (it was made to work with the new react-redux-firebase).

Hey @prescottprue - I'm also experiencing this. I've got the following versions working together and experiencing the same issue - please advise if this isn't a viable configuration.

    "firebase": "^5.8.3",
    "redux-firestore": "^0.6.4",
    "react": "^16.8.2",
    "react-dom": "^16.8.2",
    "react-redux-firebase": "3.0.0-alpha.9",

If this is a bug - can you point me in the direction of which library you suspect the regression is in, or which library you intended on implementing this in, and I'll have a go at putting a PR together.

I intend to make considerable use of this library and would like to help move both alpha versions closer to a release if possible.

@jamesjryan It is in this library (react-redux-firebase). You will want to make updates for the alpha version in PRs that are against the next branch.

I'm also experiencing this. Any progress?

Same problem here.

"firebase": "^6.4.0",
"react-firebaseui": "^4.0.0",
"react-redux": "^7.1.0",
"react-redux-firebase": "^3.0.0-alpha.16",
"redux-firestore": "^0.8.0"

Looks like this issue is specific to type: 'redirect'. If you change the type to be popup instead, it works.

eg.

firebase.login({
  provider: 'google',
  type: 'popup'
})

Here are the versions I'm using:

"firebase": "^7.5.1",
"react-redux": "^7.1.3",
"react-redux-firebase": "^3.0.5",
"redux-firestore": "^0.11.0"

I am experiencing this with signInWithPopup with Google as the provider. Has there been any progress?

react": "^16.13.1", "firebase": "^7.13.2", "react-dom": "^16.13.1", "react-redux": "^7.2.0", "react-redux-firebase": "^3.3.0",

Was this page helpful?
0 / 5 - 0 ratings