I am new to Firebase and have been trying to implement a \"Sign Up\" page for my app. Currently, I am only using the email feature, just to test things out. I am able to cre
Before you try any code, make sure your password is at least 6 characters. Print the error if is possible, I print the error on each function, sign up and sign in.
@IBAction func signUp(_ sender: Any) {
Auth.auth().createUser(withEmail: self.usernameTextField.text!, password: self.passwordTextField.text!) {(user, error) in
if user != nil {
print("User Has SignUp")
}
if error != nil {
print(":(",error)
}
}
Auth.auth().signIn(withEmail: self.usernameTextField.text!, password: self.passwordTextField.text!) {(user, error) in
if user != nil {
print("User Has Sign In")
}
if error != nil {
print(":(",error)
}
}