()
| 29 | } |
| 30 | |
| 31 | async linkGithub() { |
| 32 | if (!this.user) { |
| 33 | return; |
| 34 | } |
| 35 | const provider = new OAuthProvider('github.com'); |
| 36 | provider.addCustomParameter('allow_signup', 'false'); |
| 37 | provider.setScopes(['user:email']); |
| 38 | |
| 39 | firebase() |
| 40 | .auth() |
| 41 | .getProviderCredential(provider) |
| 42 | .then((cred) => { |
| 43 | firebase().auth().currentUser.linkWithCredential(cred); |
| 44 | console.log('cred', cred); |
| 45 | }) |
| 46 | .catch((e) => { |
| 47 | console.log('Failed to link Github', e); |
| 48 | }); |
| 49 | } |
| 50 | |
| 51 | async linkYahoo() { |
| 52 | if (!this.user) { |
nothing calls this directly
no test coverage detected