Closed LeviOrtega closed 1 year ago
To get around this, i have just been calling
SubmitButton{Auth.auth().signIn(withEmail: email, password: password) { result, error in
if let error = error {
// Handle login error
errorMessage = "Invalid Email or Password, try again."
} else {
// Login successful
authState.isLoggedIn = true
}
within LoginView, but I want to move this functionality over to AuthState
Authstate contains the function
Which when called from a button, will not work. My theory is that is is needing to use Dispach.Async or something, but I don't know.