File tree Expand file tree Collapse file tree 1 file changed +2
-27
lines changed Expand file tree Collapse file tree 1 file changed +2
-27
lines changed Original file line number Diff line number Diff line change @@ -40,31 +40,6 @@ export class AppComponent {
4040}
4141```
4242
43- ## Cordova case
43+ ## Cordova
4444
45- Firebase authentication wasn't entirely compatible with cordova. You need to add some specific operations.
46-
47- ** Example:**
48-
49- Login with Facebook.
50-
51- 1 . Install the cordova plugin
52-
53- ``` bash
54- cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID=" 123456789" --variable APP_NAME=" myApplication"
55- ```
56-
57- 2 . Use ` signInWithCredential ` method
58-
59- ``` ts
60- console .log (" Facebook success: " + JSON .stringify (result ));
61- var provider = firebase .auth .FacebookAuthProvider .credential (result .authResponse .accessToken );
62-
63- afAuth .auth .signInWithCredential (provider )
64- .then ((success ) => {
65- console .log (" Firebase success: " + JSON .stringify (success ));
66- })
67- .catch ((error ) => {
68- console .log (" Firebase failure: " + JSON .stringify (error ));
69- });
70- ```
45+ Learn how to [ setup Firebase Authentication with Cordova] ( https://firebase.google.com/docs/auth/web/cordova ) in the Firebase Guides.
You can’t perform that action at this time.
0 commit comments