1
火力reauthenticate
方法需要credential
對象,例如:火力地堡重新驗證社會提供商
const token = await firebase.auth.currentUser.getToken();
const credential = firebase.auth.FacebookAuthProvider.credential(token);
如果當時我嘗試做reauthenticate
我收到錯誤消息的accessToken無效
firebase.auth.currentUser.reauthenticate(credential);
錯誤:
code:"auth/internal-error"
{"domain":"global","reason":"invalid","message":"invalid access_token, error code 43."}
謝謝你,是的,這幫助。基本上我必須保存在'await firebase.auth.signInWithPopup(provider)'後的auth對象返回的'accessToken',然後我可以使用它代替firebase令牌。謝謝 – Yuri