()
| 68 | } |
| 69 | |
| 70 | async linkGoogle() { |
| 71 | try { |
| 72 | if (!this.user) { |
| 73 | return; |
| 74 | } |
| 75 | if (!didInit) { |
| 76 | await GoogleSignin.configure(); |
| 77 | didInit = true; |
| 78 | } |
| 79 | const isAvailable = await GoogleSignin.playServicesAvailable(); |
| 80 | if (!isAvailable) { |
| 81 | return; |
| 82 | } |
| 83 | const user = await GoogleSignin.signIn(); |
| 84 | const cred = GoogleAuthProvider.credential(user.idToken, user.accessToken); |
| 85 | const linked = await this.user.linkWithCredential(cred); |
| 86 | console.log(linked); |
| 87 | } catch (e) { |
| 88 | console.log('linkGoogle', e.native); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | async linkPhone() { |
| 93 | if (!firebase().auth().currentUser) { |
nothing calls this directly
no test coverage detected