From c7835333c9833efa103ca446683c8f99959a7a48 Mon Sep 17 00:00:00 2001 From: Nikolay Iliev Date: Thu, 11 Apr 2019 11:24:47 +0300 Subject: [PATCH] fix: fireabase User breaking change --- app/services/login.service.ts | 12 ++++++------ package.json | 7 ++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/app/services/login.service.ts b/app/services/login.service.ts index 16009cf..edfe0b0 100644 --- a/app/services/login.service.ts +++ b/app/services/login.service.ts @@ -71,18 +71,18 @@ export class LoginService { }).then((result) => { let user: User = result; this._appCenter.trackEvent("Facebook Login", [ - { key: "user", value: user.name } + { key: "user", value: user.displayName } ]); setBoolean("isLogged", true); setString("uid", user.uid); - setString("username", user.name); + setString("username", user.displayName); setString("userPicture", user.additionalUserInfo.profile["picture"]["data"]["url"]); this.authenticateAction( routerExtensions, user.uid, - user.name, + user.displayName, user.additionalUserInfo.profile["picture"]["data"]["url"] ); }).catch((errorMessage) => { @@ -108,18 +108,18 @@ export class LoginService { }).then((result) => { let user: User = result; this._appCenter.trackEvent("Google Login", [ - { key: "user", value: user.name } + { key: "user", value: user.displayName } ]); setBoolean("isLogged", true); setString("uid", user.uid); - setString("username", user.name); + setString("username", user.displayName); setString("userPicture", user.additionalUserInfo.profile["picture"]["data"]["url"]); this.authenticateAction( routerExtensions, user.uid, - user.name, + user.displayName, user.additionalUserInfo.profile["picture"]["data"]["url"] ); }).catch((errorMessage) => { diff --git a/package.json b/package.json index 9508eb2..cf6f415 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,8 @@ "repository": "", "nativescript": { "id": "org.nativescript.curiosity", - "tns-ios": { - "version": "5.4.0-2019-04-03-180044-02" - }, "tns-android": { - "version": "5.4.0-2019-04-08-180559-01" + "version": "5.3.1" } }, "dependencies": { @@ -26,7 +23,7 @@ "nativescript-app-center": "^1.0.3", "nativescript-cardview": "^3.1.1", "nativescript-permissions": "^1.3.5", - "nativescript-plugin-firebase": "^8.1.1", + "nativescript-plugin-firebase": "^8.2.0", "nativescript-social-share": "^1.5.1", "nativescript-theme-core": "^1.0.4", "nativescript-ui-sidedrawer": "^6.0.0",