Reactjs 获取firebase id

Reactjs 获取firebase id,reactjs,firebase,Reactjs,Firebase,我使用firebase身份验证。使用signInWithEmailAndPassword功能时,我需要获取firebase id。我尝试使用结果获取firebase id。但我不能 firebase身份验证功能 const signInresponse = await firebaseAuth.signInWithEmailAndPassword(email, password).then((res)=>{ console.log(res); }) history.push

我使用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);
} 

成功登录后是否需要用户名?谢谢。我会检查