You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2023. It is now read-only.
// note that you need to generate the login token in your existing backend server
337
+
type:firebase.LoginType.CUSTOM,
338
+
token: token
329
339
}).then(
330
340
function (result) {
331
-
dialogs.alert({
332
-
title:"User created",
333
-
message:"userid: "+result.key,
334
-
okButtonText:"Nice!"
335
-
})
341
+
// the result object has these properties: uid, provider, expiresAtUnixEpochSeconds, profileImageURL, token
342
+
JSON.stringify(result);
343
+
},
344
+
function (errorMessage) {
345
+
console.log(errorMessage);
346
+
}
347
+
)
348
+
```
349
+
350
+
#### Facebook login
351
+
On iOS this is rock solid, but on Android it's work in progress. If you want to use it for iOS open the `Podfile` in the plugin's `platforms/ios` folder and uncomment the Facebook line (you can't miss it).
@@ -391,7 +410,7 @@ com.android.dex.DexIndexOverflowException: method ID not in..
391
410
392
411
Congrats, you ran into [this issue](https://github.com/NativeScript/android-runtime/issues/344)
393
412
which can be solved by adding `multiDexEnabled true` to your `app/App_Resources/Android/app.gradle`
394
-
so it becomes somehthing like this:
413
+
so it becomes something like this:
395
414
396
415
```
397
416
android {
@@ -423,7 +442,7 @@ or start a geny emulator first and do: `tns run android`
423
442
## Future work
424
443
- Add support for `removeEventListener`.
425
444
- Possibly add more login mechanisms.
426
-
445
+
- Add other Firebase 3.x SDK features (there's already a few feature requests in the GitHub issue tracker.
427
446
428
447
## Credits
429
448
The starting point for this plugin was [this great Gist](https://gist.github.com/jbristowe/c89a7bcae7fc9a035ee7) by [John Bristowe](https://github.com/jbristowe).
0 commit comments