Skip to content

BE: Add user data to Firestore DB on registration

Currently on registration the user is only added to FireBase Authentication

  • Need to add user info to Firestore DB (First name, Last name, email, username, uid) on registration

  • add empty/null fields for favourites and study room preferences

    then also: under DBStorage.kt, under the storeBookings function, uncomment the val userRef and ensure the userID added to the bookings collection is a reference to the userID in the users collection (like how studyRoomRef is a reference to the studyRooms collection in the same function)

UID in authentication DB should be the unique ID in the users collections in Firestore

Edited by Iman Ahsan