我正在工作的一个反应应用程序,让用户登录与用户。我正在使用Firebase来处理身份验证。我正在使用express编写云函数。我想和谷歌签约,但我有几个问题。
到目前为止,我在与谷歌签约的后端有以下内容:
const { id_token } = req.body //de-structure id token passed in through body of request
const credential = firebase.auth.GoogleAuthProvider.credential(id_token);
如何使用这些凭据在我的数据库中注册这个用户?如何检查该用户是否已注