Android Question [ firebase auth ] can i authenticate using Apple Id on android using firebase auth ?

Erel

B4X founder
Staff member
Licensed User
Longtime User
Firebase instructions: https://firebase.google.com/docs/auth/android/apple

From a quick look, the only part which requires "translation" is the OAuthProvider code. It should be complicated to implement it with JavaObject. I can help you with this.
It does require some configuration which is explained on that that page.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Start with this code:
B4X:
Dim OAuthProvider As JavaObject
Dim Builder As JavaObject = OAuthProvider.InitializeStatic("com.google.firebase.auth.OAuthProvider").RunMethod("newBuilder", Array("apple.com"))
Dim Provider As JavaObject = Builder.RunMethod("build", Null)
Dim auth As JavaObject
auth = auth.InitializeStatic("com.google.firebase.auth.FirebaseAuth").RunMethod("getInstance", Null)
Dim ctxt As JavaObject
ctxt.InitializeContext
auth.RunMethod("startActivityForSignInWithProvider", Array(ctxt, Provider))
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…