[Solved] Why is this block of code here?


It looks like that call validates the values that the user entered into the form, before sending those values to the server to create an account with them.

This type of client-side validation can improve the experience of the users of the app, since they get more immediate feedback in case they entered some invalid data.

For the precise form validation that the app performs, have a look at the code of the validateForm method in the same file. In this case it catches empty username and password, which would indeed be rejected by the Firebase Authentication server.

solved Why is this block of code here?