android - Firebase 匿名 UID 可以在 Android/iOS SDK 上自行过期吗?

标签 android firebase

我正在使用 Firebase Unity。我发现在应用程序的单独运行中,如果您使用相同的 string 名称初始化 FirebaseApp,您可以获得上一次运行的 FirebaseAuth CurrentUser 并且我可以看到 UID。我什至可以通过多个 FirebaseApp 实例保留 2 个 CurrentUser(似乎由 string 名称链接)

通过这种方式,我可以按预期方式使用 SignInAnonymously 来引导玩家并让他玩任意天或运行任意多的应用程序,直到他想通过提供LinkWithCredentialAsync 的电子邮件和密码。

我还发现,如果你在安卓的设置里卸载应用或者清除应用数据,授权就没有了。但是应用程序更新会保留身份验证。可以理解。

但我担心的是保留的授权会自动过期吗?例如,玩家去年使用匿名 ID 玩游戏,但没有 promise 链接到电子邮件凭据。如果他一年后回来,他还能访问同一个帐户吗? (该应用程序没有重新安装,只是升级了。)我在文档中没有看到任何关于此的信息。

最佳答案

I also found that if you uninstall the app or clear app data in the Settings of Android, the auth is gone.

没错。 Firebase 匿名身份验证帐户不会在应用程序卸载后保留。如果您卸载应用程序,本地保存的所有内容都将被删除,包括标识该帐户的匿名身份验证 token 。

But what I worried is that can the preserved auth expires on its own?

标识用户帐户的匿名身份验证 token 不会过期。 Firebase 不会自动或以任何其他方式删除 token ,因为它真的不知道用户是否仍在存储链接到该匿名帐户的数据。

For example the player played the game last year with anonymous ID without committing to linking to e-mail credential. If he come back a year later can he still access the same account? (The app is not reinstalled, just upgraded.)

如果玩家没有卸载应用程序并且他也没有没有清除缓存,那么他肯定可以使用同一个帐户再次玩游戏。

关于android - Firebase 匿名 UID 可以在 Android/iOS SDK 上自行过期吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57942631/

相关文章:

android - Android 中的隐藏对象游戏?

android - Android 中 View 导航的设计模式?

javascript - 在本地测试我的 firebase 身份验证触发器

firebase - 在 Firebase 中按数组值搜索

javascript - Firebase 身份验证有效但不断刷新页面

使用 REST 或 SOAP 的 Magento 商店的 Android 应用程序?

java - 如何为动态创建的 TextView 设置点击功能?

Android 使用 ListView 查看分页器并动态添加文本

node.js - 在 Firebase Cloud Functions 中仅部署单个非导出函数

firebase - Firebase Cloud Messaging 是否被视为消息代理?