<commit_before># cordova-plugin-firebase
This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project!
Android and iOS supported.

Donations are welcome and will go towards further development of this project. Use the wallet address below to donate.

BTC: 1JuXhHMCPHXT2fDfSRUTef9TpE2D67sc9f

Thank you for your support!

## in this fork
### verifyPhoneNumber (Android only)

Request a verificationId and send a SMS with a verificatioCode.
Use them to construct a credenial to sign in the user (in your app).
https://firebase.google.com/docs/auth/android/phone-auth
https://firebase.google.com/docs/reference/js/firebase.auth.Auth#signInWithCredential

```
window.FirebasePlugin.verifyPhoneNumber(number, timeOutDuration, function(credential) {
    console.log(credential);

    // ask user to input verificationCode:
    var code = inputField.value.toString();

    var verificationId = credential.verificationId;
    
    var signInCredential = firebase.auth.PhoneAuthProvider.credential(verificationId, code);
    firebase.auth().signInWithCredential(signInCredential);
}, function(error) {
    console.error(error);
});
```

## Installation<commit_msg>- Updating README to take some notes of phone number authentication<commit_after># cordova-plugin-firebase
This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project!
Android and iOS supported.

Donations are welcome and will go towards further development of this project. Use the wallet address below to donate.

BTC: 1JuXhHMCPHXT2fDfSRUTef9TpE2D67sc9f

Thank you for your support!

## in this fork
### verifyPhoneNumber (Android only)

Request a verificationId and send a SMS with a verificatioCode.
Use them to construct a credenial to sign in the user (in your app).
https://firebase.google.com/docs/auth/android/phone-auth
https://firebase.google.com/docs/reference/js/firebase.auth.Auth#signInWithCredential

NOTE: To use this auth you need to configure your app SHA hash in the android app configuration on firebase console.
See https://developers.google.com/android/guides/client-auth to know how to get SHA app hash.

NOTE: This will only works on physical devices.

```
window.FirebasePlugin.verifyPhoneNumber(number, timeOutDuration, function(credential) {
    console.log(credential);

    // ask user to input verificationCode:
    var code = inputField.value.toString();

    var verificationId = credential.verificationId;
    
    var signInCredential = firebase.auth.PhoneAuthProvider.credential(verificationId, code);
    firebase.auth().signInWithCredential(signInCredential);
}, function(error) {
    console.error(error);
});
```

## Installation
{'fraction_non_alphanumeric': 0.08252252252252253, 'fraction_numerical': 0.005045045045045045, 'mean_word_length': 4.982758620689655, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7401882', 'n_tokens_mistral': 799, 'n_tokens_neox': 771, 'n_words': 260}