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

Method linkPhone

apps/demo/src/plugin-demos/firebase-auth.ts:92–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90 }
91
92 async linkPhone() {
93 if (!firebase().auth().currentUser) {
94 console.info('Login to link phone');
95 return;
96 }
97 try {
98 const cred = PhoneAuthProvider.provider().credential(this.verificationId, this.code);
99 const linkedCred = await firebase().auth().currentUser.linkWithCredential(cred);
100 console.log('verificationId', linkedCred);
101 } catch (e) {
102 console.log('linkPhone error:', e);
103 }
104 }
105
106 async getVerificationCode() {
107 try {

Callers

nothing calls this directly

Calls 6

firebaseFunction · 0.90
authMethod · 0.80
credentialMethod · 0.65
linkWithCredentialMethod · 0.65
logMethod · 0.65
providerMethod · 0.45

Tested by

no test coverage detected