i have created a flutter app in which phone authentication is used for sign In process. User enters phone number then it is redirected to otp page n after verification user gets logged in.
So i want to check whether the user is an old or new user. When user enters the phone number then it must check whether the user exist in the Firebase Authentication, if yes redirect to otp screen or if not then it must show snackbar that user does not exist and redirect to sign up page.
So how should i search for the phone number in firebase authentication page in flutter?