Skip to content

Commit

Permalink
Use ya in case xa is false (#18074)
Browse files Browse the repository at this point in the history
This closes [#18023](#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.
  • Loading branch information
gr-qft committed Oct 21, 2020
1 parent 91eb984 commit c28d39e
Showing 1 changed file with 2 additions and 2 deletions.
@@ -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,
}
}

0 comments on commit c28d39e

Please sign in to comment.