I am trying to add Phone Authentication of Firebase in my android application, it works fine with all the otp and stuff but there are two problems I am having.
The first problem: OTP verification webpage
The following picture will clear the problem-
Before getting an OTP, this webpage shows up which is not really user friendly. The user won't like this redirecting webpage scenario every time he is getting an OTP. How to disable or hide this webpage? I don't want it to go the browser first and then return back to the app, this may destroy the activity which is an issue for low-ram phones. I researched about it and I found some questions here too. But they are all old questions, the answers are different and those answers don't work now. For example, in this question how-to-disable-recaptcha-in-firebase-phone-auth-otp-android, they said that using Android Device Verification api will disable the verification webpage. But that api is decapitated now, also the Google Play Integrity API doesn't work as well. I added SHA-1 and SHA-256 in my project, the problem still there. I tried to find the App Check with the SafetyNet option but I can't find it in my project setting, seems like that has been decapitated too. I desperately need updated solution and I hope that I will find some here because I'm out of ideas at this point.
The second problem: Unusual Activity
My application is a chat app, people need to sign up and sign in all the time. I added the phone auth option to sign in to the app, but if I sign in using the same phone number (which is normal, user will have only one or two phone number) for two or three times I get this message-
How to solve this unusual activity problem? I am using a real phone with a real phone number still it says unusual activity, if user can't sign in to his profile after two or three times or need to wait for some time to sign in then how is that user friendly? Help me solve this problem please.
These are the two problems I am having, I hope I will get some right answers. Thank you.