I want the user to be able to login with phone and password.
If the user enters the app first time, he es registered by validating his phonenumber, thats the current state at firebase. But I dont want to always send a sms code to the user every time he wants to login.
Now in the next step of the authentification the user should enter an email and a password, so I can link the credentials with the phone. The user is now able to login with email and password and with phone and verification code.
But I want to have the function that the user can login with phoneNumber and password. So I can write a cloud function for "doesPhoneNumber" exist which goes through the user-db and tells me if the user can login or have to sign up.
The next function is now my actual problem, i want to send the phone number and the password to a extra cloud function to receive the authToken but how can I verify if the credentials are correct within that function?