Skip to content

Commit

Permalink
Merge pull request #16 from NickIliev/niliev/webpack-update
Browse files Browse the repository at this point in the history
fix: firebase User breaking change
  • Loading branch information
NickIliev authored Apr 11, 2019
2 parents 812917e + c783533 commit 5443936
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
12 changes: 6 additions & 6 deletions app/services/login.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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) => {
Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@
"repository": "<fill-your-repository-here>",
"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": {
Expand All @@ -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",
Expand Down

0 comments on commit 5443936

Please sign in to comment.