Testing our code is essential at this point: we should check, document, and verify the behaviors of our system before running the application in a server instance. Furthermore, it is also crucial to test authentication behavior because it is a sensitive part of our service.
Since the UserRepository implementation is the most low-level part of the authentication stack and the first component that relies on EF Core to retrieve, update, and authenticate the user, we can keep it isolated and exclude it from the testing process by mocking the IUserRepository interface.