Open taylcr opened 1 year ago
The switch was necessary for security and simplicity reasons as we talked in the meeting
Done with this part, it worked
I also made a function to keep in track the so say if a user has successfully logged in
const register = async () => { try { const userCredential = await createUserWithEmailAndPassword(auth, email, password); const additionalInfo = { surname, name, userType }; await createUserProfile(userCredential, additionalInfo); handleLogin(userType); // Call handleLogin with the correct user type setSuccess("Successfully signed up! Redirecting to home page..."); setError(""); navigateToHome(); } catch (err) { setError(err.message); setSuccess(""); } };
The same function above also redirect the user to the main page after login :
from: #227 #68
TASK DESCRIPTION
As a developer, I want to implement a user registration feature that not only authenticates users but also captures and stores extended profile information in Firestore, so that we can have a richer user profile for personalized experiences.
ACCEPTANCE CRITERIA
userProfiles
collection.