From c28d39e47d7337636e832134b26d6214357fe3d4 Mon Sep 17 00:00:00 2001 From: Tuan Nguyen <69383359+gr-qft@users.noreply.github.com> Date: Tue, 20 Oct 2020 21:17:39 -0400 Subject: [PATCH] Use ya in case xa is false (#18074) This closes [#18023](https://github.com/vercel/next.js/issues/18023). I was following the example mentioned in the issue (https://github.com/vercel/next.js/tree/canary/examples/with-firebase-authentication) and for some reason `xa` was always false, failing fetching food. Through `console.log` I saw that `ya` contained a token value and using `ya` worked. --- .../with-firebase-authentication/utils/auth/mapUserData.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/with-firebase-authentication/utils/auth/mapUserData.js b/examples/with-firebase-authentication/utils/auth/mapUserData.js index 8036456b72..5421e3dc5d 100644 --- a/examples/with-firebase-authentication/utils/auth/mapUserData.js +++ b/examples/with-firebase-authentication/utils/auth/mapUserData.js @@ -1,8 +1,8 @@ export const mapUserData = (user) => { - const { uid, email, xa } = user + const { uid, email, xa, ya } = user return { id: uid, email, - token: xa, + token: xa || ya, } } -- GitLab