MCPcopy Create free account
hub / github.com/NativeScript/firebase / ensureClass

Function ensureClass

packages/firebase-auth/index.android.ts:684–717  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

682let OnVerificationStateChangedCallbacks;
683
684function ensureClass() {
685 if (OnVerificationStateChangedCallbacks) {
686 return;
687 }
688
689 @NativeClass()
690 class OnVerificationStateChangedCallbacksImpl extends com.google.firebase.auth.PhoneAuthProvider.OnVerificationStateChangedCallbacks {
691 _resolve;
692 _reject;
693
694 constructor(resolve, reject) {
695 super();
696 this._resolve = resolve;
697 this._reject = reject;
698 return global.__native(this);
699 }
700
701 onVerificationFailed(error) {
702 this._reject(FirebaseError.fromNative(error));
703 }
704
705 onVerificationCompleted(credential: com.google.firebase.auth.PhoneAuthCredential) {}
706
707 onCodeSent(verificationId: string, resendingToken: com.google.firebase.auth.PhoneAuthProvider.ForceResendingToken) {
708 this._resolve(verificationId);
709 }
710
711 onCodeAutoRetrievalTimeOut(verificationId: string) {
712 this._resolve(verificationId);
713 }
714 }
715
716 OnVerificationStateChangedCallbacks = OnVerificationStateChangedCallbacksImpl;
717}
718
719export class PhoneAuthProvider {
720 _native: com.google.firebase.auth.PhoneAuthOptions.Builder;

Callers 1

verifyPhoneNumberMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected