I have an Android app where I use Firebase Auth API to confirm the user's phone, also I have my own server to store user data.
I'm planning to make cross-platform app using kmm. But problem is that Firebase Auth API require call setActivity(activity)
method to be called, which depends on the Android activity.
I would like to share the authorization code between Android and iOS. Are there any solutions that allow you to use common Kotlin client side code or Kotlin server side code to do this?
I ended up have implemented 2 endpoints (/send_code
and /check_code
) on my server and have used a third party API to send SMS. An important part of the implementation was the IP limit on the number of requests, since all third-party APIs are paid.