firebase / firebase/firebase-cpp-sdk
[Bug] User object unexpectedly updates UID when logging in
- 主要语言
- C++
- 星标
- 326
- 派生
- 137
- 平均合并
- 3 天 9 小时
- 30 天内合并 PR
- 5
描述
### [REQUIRED] Please fill in the following fields:
* Pre-built SDK from the [website](https://firebase.google.com/download/cpp) or open-source from this repo: open-source (self built)
* Firebase C++ SDK version: 11.0.1
* Main Firebase Components in concern: Auth
* Other Firebase Components in use: -
* Platform you are using the C++ SDK on: Windows
* Platform you are targeting: Windows
### [REQUIRED] Please describe the question here:
We noticed that a `User` object obtained from `current_user()` dynamically updates its UID and other user properties to match the current user’s properties when logging in or out.
This prevents keeping a reference to a previously logged in user, e.g. to delete a previously logged in anonymous user after logging in with user credentials.
This behavior does not match the iOS or Android SDK‘s behavior, where an object obtained from the equivalent `current_user()` method will not change when logging or out, and as far as we could tell it is also not documented.
I‘d appreciate feedback to know whether this is intended behavior or a bug, and whether there is a way to work around this behavior. I'm probably just missing something here.
贡献指南
调研方向
首先,使用 Firebase C++ SDK 11.0.1 在 Windows 上复现与 Auth 的 current_user() 以及 login 或 logout 相关的行为。比较之前获取的 User 对象的 UID 和其他属性是否发生变化,并查看评论讨论,以了解预期的生命周期语义。完成的标准是确定这是否为 bug,并记录或测试预期行为,但该 issue 未指定实现文件或测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- cpp
- 领域
- authentication
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100