Get firebase id



我使用firebase身份验证。使用signInWithEmailAndPassword函数时,我需要获取firebase id。我尝试使用结果获取firebase id。但我做不到。

firebase身份验证功能

const signInresponse = await firebaseAuth.signInWithEmailAndPassword(email, password).then((res)=>{
console.log(res);
})
history.push('/User/Directory');
} catch (e) {
console.error(e);
} 

用户id位于结果的用户对象内部。

const signInresponse = await firebaseAuth.signInWithEmailAndPassword(email, password).then((res)=>{
console.log(res.user.uid);
})
history.push('/User/Directory');
} catch (e) {
console.error(e);
} 

最新更新