Web 视图阻止 Web 应用程序中的 google 身份验证的解决方法

发布于 2025-01-09 13:06:25 字数 695 浏览 2 评论 0原文

早上好,

我在使用 Firebase Auth(特别是 Google OAuth)时面临着困境。 当用户通过网络视图访问我的网站时,谷歌似乎阻止了他们的 OAuth 的使用(例如,他们点击了 TikTok 中的链接,并且该网站已在 TikTok 的视图中打开)

。已经阻止了这一点,但是,这现在阻止了我的广告成功,因为用户看到广告,点击链接,然后它在 TikTok 网络视图中打开,然后他们无法登录我的网络应用程序。

验证插件,其代码如下: Nuxt/Firebase

const provider = new this.$fireModule.auth.GoogleAuthProvider()
  provider.setCustomParameters({
    prompt: 'select_account'
  })
  this.$fire.auth.signInWithPopup(provider)

我正在使用简单的 Firebase身份 有人知道任何解决方法吗?我已经用谷歌搜索了很多次,但我遇到的唯一真正的解决方案是,如果我正在创建一个 android/ios 应用程序,并且这不是移动应用程序,这只是一个网络应用程序。

非常感谢您的帮助。

Good Morning,

So I am facing a dilemma using Firebase Auth (specifically Google OAuth).
Google seems to have blocked the use of their OAuth when a user access my site via a web-view (for example they have clicked on the link in TikTok and the website has opened within a view in TikTok)

It makes sense as to why Google has blocked this, however, this is now stopping my ads from being successful as users see the ad, click on the link, and then it opens up in the TikTok web view, and then they can't log into my web application.

I'm using the simple Firebase Authentication plugin, with Nuxt/Firebase the code for it is as below:

const provider = new this.$fireModule.auth.GoogleAuthProvider()
  provider.setCustomParameters({
    prompt: 'select_account'
  })
  this.$fire.auth.signInWithPopup(provider)

Does anyone know any workaround? I've googled this so much but the only real solution I have come across is if I'm creating an android/ios app and this is not a mobile application, this is just a web application.

Thanks so much for your help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文