Remove console.log. Log onIdTokenChanged error.
This commit is contained in:
parent
71dfcc4dd9
commit
ecacce0796
|
@ -46,8 +46,9 @@ export function AuthProvider(props: {
|
||||||
}, [setAuthUser, serverUser])
|
}, [setAuthUser, serverUser])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
return onIdTokenChanged(auth, async (fbUser) => {
|
return onIdTokenChanged(
|
||||||
console.log('onIdTokenChanged', fbUser)
|
auth,
|
||||||
|
async (fbUser) => {
|
||||||
if (fbUser) {
|
if (fbUser) {
|
||||||
setTokenCookies({
|
setTokenCookies({
|
||||||
id: await fbUser.getIdToken(),
|
id: await fbUser.getIdToken(),
|
||||||
|
@ -69,7 +70,11 @@ export function AuthProvider(props: {
|
||||||
setAuthUser(null)
|
setAuthUser(null)
|
||||||
localStorage.removeItem(CACHED_USER_KEY)
|
localStorage.removeItem(CACHED_USER_KEY)
|
||||||
}
|
}
|
||||||
})
|
},
|
||||||
|
(e) => {
|
||||||
|
console.error(e)
|
||||||
|
}
|
||||||
|
)
|
||||||
}, [setAuthUser])
|
}, [setAuthUser])
|
||||||
|
|
||||||
const uid = authUser?.user.id
|
const uid = authUser?.user.id
|
||||||
|
|
Loading…
Reference in New Issue
Block a user