Firebase在iOS上使用电子邮件链接进行登录,而不需要’在应用中打开链接’?

huangapple go评论71阅读模式
英文:

Firebase signin with email link on iOS without 'open link in app'?

问题

我在我的移动应用中使用无密码登录。这是通过Firebase身份验证完成的。

当我在iOS上打开一个魔法链接时,它首先将我带到preview.page.link,显示在应用中打开链接?页面。而在Android上,它直接进入应用程序。

有没有办法避免在iOS上执行这一步骤?

英文:

I use passwordless login in my mobile app. That is done with Firebase Authentication.

When I open a magic link on iOS it first takes me to preview.page.link which displays the Open link in app? page. Whereas on Android it goes straight to the app.

Is there anyway to avoid that step on iOS?

答案1

得分: 1

你所描述的行为是特定于iOS设备的,旨在提供安全保护。iOS处理通用链接与Android处理深度链接的方式不同。

当在iOS设备上打开魔法链接时,首先会被操作系统拦截,操作系统会检查与链接关联的应用是否已安装。如果应用已安装,iOS将直接打开该应用。但是,如果应用未安装,iOS将重定向用户到一个预览页面(在这种情况下是 preview.page.link),以提供内容的预览,并让用户选择是否在应用中打开链接。

这个行为的设计目的是防止恶意应用截取和窃取敏感信息。它通过允许用户在决定是否在应用中打开链接之前预览内容,提供了额外的安全层级。不幸的是,这个行为不能被应用开发者通过编程方式绕过或更改。

因此,在iOS上无法避免中间步骤并实现与Android上相同的行为。在iOS上,无论应用是否已安装,用户都会看到“在应用中打开链接?”页面。

英文:

The behavior you described is specific to iOS devices and is intended for security purposes. iOS handles universal links differently than Android does with deep links.

When a magic link is opened on an iOS device, it is first intercepted by the operating system, which checks if the app associated with the link is installed. If the app is installed, iOS will open the app directly. However, if the app is not installed, iOS will redirect the user to a preview page (in this case, preview.page.link) to provide a preview of the content and give the user the option to open the link in the app.

This behavior is designed to prevent malicious apps from intercepting and stealing sensitive information. It provides an extra layer of security by allowing users to preview the content before deciding to open it in the app. Unfortunately, this behavior cannot be bypassed or changed programmatically by the app developer.

"Therefore, it is not possible to avoid the intermediate step on iOS and have the same behavior as on Android. Users on iOS will always see the "Open link in app?" page when opening a magic link, regardless of whether the app is already installed or not."

huangapple
  • 本文由 发表于 2023年7月10日 17:35:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/76652474.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定