cordova-plugin-firebasex
cordova-plugin-firebasex copied to clipboard
(ios) Return rawNonce in credential result when authentication with A…
…pple is successful.
PR Type
What kind of change does this PR introduce?
- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Documentation changes
- [ ] Other... Please describe:
PR Checklist
Please check your PR fulfills the following requirements:
Bugfixes:
- [ ] Regression testing has been carried out using the example project to ensure the intended bug is fixed and no regression bugs have been inadvertently introduced.
New features/enhancements:
- [x] Exhaustive testing has been carried out for the new functionality
- [ ] Regression testing has been carried out to ensure no existing functionality is adversely affected
- [ ] Documentation has been added / updated
- [ ] The example project has been update to validate/demonstrate the new functionality.
What is the purpose of this PR?
Fixes https://github.com/dpa99c/cordova-plugin-firebasex/issues/867, which was a follow-up of https://github.com/dpa99c/cordova-plugin-firebasex/issues/857
Basically, after you use FirebasePlugin.authenticateUserWithApple() you get a credential object. This object can be used to login with the Firebase javascript SDK:
const appleWebCredentials = appleProvider.credential({idToken: credential.idToken, rawNonce: credential.rawNonce});
firebase.auth().signInWithCredential(appleWebCredentials);
Unfortunately, the rawNonce is not passed from the plugin. This pull request fixes it.
Does this PR introduce a breaking change?
- [ ] Yes
- [x] No