Vue3+Quasar+Firebase集成Facebook登录报错:“该应用不可用”求助
Vue3+Quasar+Firebase集成Facebook登录报错:"It looks like this app isn't available"
我正在开发基于Vue3、Quasar和Firebase的应用,Google登录功能正常,但集成Facebook登录时每次尝试都会报错:"It looks like this app isn't available"。
以下是Facebook登录相关代码:
async function registerUserFacebook() { const screenSize = window.innerWidth; if (screenSize > 600) { signInWithPopup(auth, providerFb) .then(async (result) => { const credential = FacebookAuthProvider.credentialFromResult(result); const token = credential.accessToken; const user = result.user; const docRef = doc(db, "users", user.uid); const docSnap = await getDoc(docRef); if (docSnap.exists()) { } else { setDoc(doc(db, "users", user.uid), { displayName: user.displayName, email: user.email, userType: "Persona", role: "user", uid: user.uid, timestamp: serverTimestamp(), favorites: [], imgSrc: {}, rating: [], }).catch((error) => {}); } getCurrentUserInfo(user.uid); router.push({ name: "home" }); }) .catch((error) => { const errorCode = error.code; const errorMessage = error.message; const credential = GoogleAuthProvider.credentialFromError(error); }); } else { signInWithRedirect(auth, providerFb) .then(async (result) => { const credential = FacebookAuthProvider.credentialFromResult(result); const token = credential.accessToken; const user = result.user; const docRef = doc(db, "users", user.uid); const docSnap = await getDoc(docRef); if (docSnap.exists()) { } else { setDoc(doc(db, "users", user.uid), { displayName: user.displayName, email: user.email, userType: "Persona", role: "user", uid: user.uid, timestamp: serverTimestamp(), favorites: [], imgSrc: {}, rating: [], }).catch((error) => {}); } getCurrentUserInfo(user.uid); router.push({ name: "home" }); }) .catch((error) => { const errorCode = error.code; const errorMessage = error.message; const credential = GoogleAuthProvider.credentialFromError(error); }); } }
我怀疑问题出在Facebook for Developers的设置中,已完成以下排查:
- 确认FB开发者设置与Firebase配置中的App ID和App Secret一致;
- 应用已处于LIVE MODE;
- email和public_profile权限已设置为ADVANCED ACCESS;
- App Domain和OAuth Redirect URI配置正确且与Firebase匹配。
请问还有哪些可能的原因?
内容的提问来源于stack exchange,提问作者Dirk Gaston
相关产品推荐
相关产品推荐

