Firebase phone authentication issue

Viewed 44

I have setup firebase phone authentication for my react-native android app published on play store. The registration process of the user occurs as follows: User fills registration information -> OTP is received via Firebase -> User clicks on Verify -> OTP is verified on firebase and the mobile number is added as an identifier in firebase -> user is registered on our server.

Basically the app flow is working well with no issues. When we wanted to reset the database, all the registered users were deleted from our servers and from the firebase authentication table. Now the weird part is, when a user that was already registered (before the database reset) tries to register again (same mobile number) on our app, without the need of inputting any OTP, he is directly added to the firebase user table (without the need of inputting any OTP). If the user is new (never registered before), the flow works normally.

To my understanding, if the mobile numbers are not deleted from firebase table, the user will not receive an OTP when he tries to register again (already registered) however this is only because the user number is already present in the firebase user table, and once the user is deleted, he should be able to register as a new user again.

Please advise how to fix this issue.

0 Answers
Related