Skip to content

Commit e2f99c0

Browse files
authored
feat(profileFactory): adding "firebase" parameter to profileFactory callback - prescottprue#772 - @dannyvaughton
2 parents c64e2a0 + d9046b8 commit e2f99c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/recipes/profile.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ The way user profiles are written to the database can be modified by passing the
8484
// within your createStore.js or store.js file include the following config
8585
const config = {
8686
userProfile: 'users', // where profiles are stored in database
87-
profileFactory: (userData, profileData) => { // how profiles are stored in database
87+
profileFactory: (userData, profileData, firebase) => { // how profiles are stored in database
8888
const { user } = userData
8989
return {
9090
email: user.email

src/actions/auth.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ export const createUserProfile = (dispatch, firebase, userData, profile) => {
277277
if (typeof config.profileFactory === 'function') {
278278
// catch errors in user provided profileFactory function
279279
try {
280-
profile = config.profileFactory(userData, profile) // eslint-disable-line no-param-reassign
280+
profile = config.profileFactory(userData, profile, firebase) // eslint-disable-line no-param-reassign
281281
} catch (err) {
282282
/* eslint-disable no-console */
283283
console.error(

0 commit comments

Comments
 (0)