在线查看和在Firebase文档中,我找不到使用先前返回的令牌(JWT)重新认证用户的方法。我确实找到了firebase.auth().signInWithCustomToken(token),但似乎不是我应该使用的。有没有办法使用Firebase SDK做到这一点?
const { user } = await firebase.auth().signInWithEmailAndPassword(email, password)
const token = await user.getIdToken(true) // will be stored for the next session
// ...
// next session after retrieving the persisted token
const { user } = await firebase.auth().signInWithCustomToken(`Bearer ${token}`) // response status 400
感谢您的帮助。