Posts

Showing posts with the label Firebase Authentication

Configured The Default Firebase App __FIRAPP_DEFAULT

Image
Answer : In my particular workflow, when adding firebase dependencies, the tutorial code and flutter warnings never prompted to modify the AppDelegate.m file. It wasn't until I dialed back and added cloud_firestore did I get prompted with this warning: 6.3.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure]; (FirebaseApp.configure() in Swift) to your application initialization. Read more: [https://firebase.google.com/docs/ios/setup#initialize_firebase_in_your_app]. open xc workspace >> open ios/Runner.xcworkspace open AppDelegate.m in AppDelegate.m add the following line: import Firebase; in AppDelegate.m add the following snippet to your application did finish method [FIRApp configure]; Here is what mine looked like in the end: This worked for me: https://medium.com/vector-com-mm/how-to-fix-ios-crash-during-the-start-firebase-configure-f3477df3154 In AppDelegate.swift change the order of GeneratedPl...

Android Studio - Get Firebase Token From GetIdToken

Answer : Your second approach is close, you just need to use <GetTokenResult> instead of <UploadTask.TaskSnapshot> as that is for uploading images using Firebase Storage. Try this: user.getIdToken(true).addOnSuccessListener(new OnSuccessListener<GetTokenResult>() { @Override public void onSuccess(GetTokenResult result) { String idToken = result.getToken(); //Do whatever Log.d(TAG, "GetTokenResult result = " + idToken); } });

Android Firebase Phone Auth Not Receiving SMS Second Time

Answer : In my case, I have my number on Phone numbers for testing (optional) Removing it from there, firebase started sending SMS Code to my number. Spark Plan offer 10k phone auth per month. So that you can test and deploy your app without paying a penny. In case someone is not getting the concept or reason of not sent sms again then please go through on my below details. I have been confused for very long time that why I didn't get sms for second time, third and so on.. First Read the original documentation: onVerificationCompleted(PhoneAuthCredential) This method is called in two situations: Instant verification: in some cases the phone number can be instantly verified without needing to send or enter a verification code. Auto-retrieval: on some devices, Google Play services can automatically detect the incoming verification SMS and perform verification without user action. (This capability might be unavailable with some carriers.) ...