Refactoring Authentication + Team Communication Challenges
WEEK 10
Felipe de Souza
11/9/2025
Introduction
This week was focused heavily on our email/password authentication flow, particularly getting our user records to consistently write to the Firestore database. Over the past few weeks, we had logic scattered between different parts of the auth layer and some inconsistencies in how the user documents were being created, especially after login. I spent time refactoring the functions responsible for user creation, sign-in, and the follow-up “bookkeeping” step that ensures a user document exists in the database.
That breakthrough finally happened this week — the app now reliably creates the user document in our main collection after sign-in. This was a blocker that had been lingering longer than it should have, so clearing it out felt like real progress.
Cleaning up and Clarifying the Code
Part of the work involved going back to the authentication logic I wrote last week and restructuring it for clarity. I focused on:
Simplifying the sign-in and account creation paths
Making the UI loading and error states more consistent
Organizing the Firebase calls so that each function has a single clear purpose
The result is cleaner, more readable code and fewer places where logic overlaps or gets duplicated. The UI also behaves more predictably now when logging in or registering.
Where Things Got Stuck: Email Verification
I attempted to add email verification this week, but that piece is not in place yet. I ran into issues during testing, and I believe part of the problem may be that I was switching between the Firebase emulator and production services. The verification emails were being sent and opened, but the app was still treating the account as unverified after login. I decided to hold off for now instead of forcing a half-working implementation. The sign-in logic works reliably — I’d rather integrate verification once I understand exactly how the emulator handles that flow.
That will be a focus next week.
Team Dynamics: Another Difficult Day
On the non-technical side, I’d be lying if I said the week ended smoothly.
There was a miscommunication about whether we were meeting today, and when I asked a simple clarifying question, the response I received escalated quickly. The conversation became more confrontational than it needed to be, and I found myself being talked down to. At that point, I chose to step away before saying something unproductive.
This has been building for a while, but today was the moment where it really surfaced. I did not address it further in the moment — instead, I’m holding the line for our scheduled Git merge meeting on Monday at 6:15 PM. I’m hopeful that by then everyone will be calmer, and we can regroup as adults, clarify expectations, and reset our communication patterns. I genuinely want the team to succeed together, not just “finish the project.”
Explore
Discover my journey as a software engineer.
© 2025. All rights reserved.