I am using Authenticate with Firebase on iOS using a Phone Number for login to my application. But currently its not.
Following code i am using to check if the user is already login.
if Auth.auth().currentUser != nil {
//login then redirect to my home controller
}
else {
//redirect user to login screen
let provider = self.authUI?.providers.first as! FUIPhoneAuth;
provider.signIn(withPresenting: self);
}
Here when i delete and install the application again user should again go through login process again but Auth.auth().currentUser is not nil at that time and it lets the users login and go to home controller.