I want to get user data from the return of creating a user, as below:
const newUserRes = await db.collection('users').add(userData);
Do you have any suggestions for me to get the new user document straight away from newUserRes
?
I don't feel right to call a new read to get it:
const newUserRef = await db.collection('users').doc(newUserRes.id).get();
const newUser = newUserRef.data()