未验证 提交 c28d39e4 编写于 作者: T Tuan Nguyen 提交者: GitHub

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. 
上级 91eb984d
export const mapUserData = (user) => {
const { uid, email, xa } = user
const { uid, email, xa, ya } = user
return {
id: uid,
email,
token: xa,
token: xa || ya,
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册