You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.02 01:01:18