【问题标题】:The current domain is not authorized for OAuth operations当前域未获得 OAuth 操作授权
【发布时间】:2022-10-23 17:34:18
【问题描述】:

大家好,我有 vite 应用程序,我使用了 firebase google auth。它工作正常,但是当我在 vercel 上部署它时,它给了我这个错误:

当前域未被授权进行 OAuth 操作。这将阻止 signInWithPopup、signInWithRedirect、linkWithPopup 和 linkWithRedirect 工作。将您的域 (todomarwenlabidi.vercel.app) 添加到 Firebase 控制台 -> 身份验证部分 -> 登录方法选项卡中的 OAuth 重定向域列表。

这是我的应用程序链接:https://todomarwenlabidi.vercel.app/

我将域添加到授权域 look this photo

这是我的firebase配置文件:

const firebaseConfig = {
        apiKey:import.meta.env.VITE_API_KEY ,
        authDomain: "todo-app-97ae2.firebaseapp.com",
        projectId: "todo-app-97ae2",
        storageBucket: "todo-app-97ae2.appspot.com",
        messagingSenderId: "540711457418",
        appId:import.meta.env.VITE_APP_ID ,
};

【问题讨论】:

    标签: reactjs firebase authentication firebase-authentication vercel


    【解决方案1】:

    您必须添加您在 firebase 授权域中使用的域(请参阅picture

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-04-23
      • 2013-07-05
      • 2019-09-09
      • 1970-01-01
      • 2016-09-18
      • 1970-01-01
      • 1970-01-01
      • 2020-08-08
      相关资源
      最近更新 更多