Previous Lecture Complete and continue  

  Lecture 14. Authentication with Firebase - Validate TextField

Supplementary Notes

Note 1.

At 00:41, which part in the source code produces the printed sentence The email address is badly formatted. Why? Hint: Was the sign up process successful?

Note 2.

Although the sign up form is more robust now, there’s still something missing. If users hit the sign up button right away without touching the text fields before that, Firebase stuff is still got called. How can we fix that? Hint: Right after the Sign Up view was loaded, the sign up form is blank anyway. It's thus more appropriate to disable the Sign Up button right away besides calling handleTextField().

Note 3.

Rewrite the guard block using an if block. What do we gain by using guard in this case? Hint: which one do you like better?

Note 4.

At 8:06 in the lecture, change UIControlState.normal to UIControlState.highlighted, what happen then?

Note 5.

When we signed up a user and then switch view, one can say that user became the current user of that app instance? Find a property of the FIRAuth class and print it out using the shared instance FIRAuth.auth() to support that argument.

Discussion
4 comments