Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. PhoneAuthProvider.OnVerificationStateChangedCallbacks callbacks
  2. = new PhoneAuthProvider.OnVerificationStateChangedCallbacks() {
  3. @Override
  4. public void onVerificationCompleted(PhoneAuthCredential credential) {
  5. Log.d(TAG, "onVerificationCompleted:" + credential);
  6. MobileVerification.credential = credential;
  7. openOTPvalidation(ON_VERIFICATION);
  8. }
  9.  
  10. @Override
  11. public void onVerificationFailed(FirebaseException e) {
  12. postException(context, TAG, e);
  13. }
  14.  
  15. @Override
  16. public void onCodeSent(String s, PhoneAuthProvider.ForceResendingToken token) {
  17. super.onCodeSent(s, token);
  18. verificationCode = s;
  19. forceResendingToken = token;
  20. openOTPvalidation(OTP_SEND);
  21. }
  22. };
  23.  
  24. private void getOTP() {
  25. if (activity != null) {
  26. pDialog = SupportingMethods.showDialogLoading(activity);
  27. pDialog.show();
  28. }
  29. String mobile = "+91" + mob;
  30. PhoneAuthProvider.getInstance().verifyPhoneNumber(
  31. mobile, // Phone number to verify
  32. 60, // Timeout duration
  33. TimeUnit.SECONDS, // Unit of timeout
  34. activity, // Activity (for callback binding)
  35. callbacks); // OnVerificationStateChangedCallbacks
  36. }
  37.  
  38. com.google.firebase.auth.FirebaseAuthException: This app is not authorized to use Firebase Authentication. Please verifythat the correct package name and SHA-1 are configured in the Firebase Console. [ App validation failed ]
  39. at com.google.firebase.auth.api.internal.zzdr.zzb(Unknown Source)
  40. at com.google.firebase.auth.api.internal.zzet.zza(Unknown Source)
  41. at com.google.firebase.auth.api.internal.zzew.run(Unknown Source)
  42. at android.os.Handler.handleCallback(Handler.java:739)
  43. at android.os.Handler.dispatchMessage(Handler.java:95)
  44. at android.os.Looper.loop(Looper.java:160)
  45. at android.app.ActivityThread.main(ActivityThread.java:5541)
  46. at java.lang.reflect.Method.invoke(Native Method)
  47. at java.lang.reflect.Method.invoke(Method.java:372)
  48. at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:964)
  49. at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)
  50. ************ DEVICE INFORMATION ***********
  51. Brand: OPPO
  52. Device: A37f
  53. Model: A37fw
  54. Id: LMY47V
  55. Product: A37fw
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement