google / google/GoogleSignIn-iOS
Support for multiple accounts
- 主要语言
- Objective-C
- 星标
- 750
- 派生
- 282
- 平均合并
- 2 天 15 小时
- 30 天内合并 PR
- 9
描述
**Is your feature request related to a problem you're having? Please describe.**
Yes. I have an application that supports multiple gmail accounts. I would like Google-SignIn to retain the login state of multiple accounts at once that way my users can switch back and forth between their gmail accounts without being prompted to login each time.
For example:
User A has 2 gmail addresses. My application allows user A to login to both accounts and switch back and forth between those accounts at a click of a button.
**Describe the solution you'd like**
currentUser could be an array of GIDGoogleUser. Each user points to a different Google account. There could be a function `currentUser(with id:)` that would let me get a specific user.
`restorePreviousSignIn` would return an array of GIDGoogleUser instead of a single user.
Each time I would call `GIDSignIn.sharedInstance.signIn`, it would add a new user to currentUser.
And so on.
**Describe alternatives you've considered**
I thought about using an OAuth library instead.
**Additional context**
None.
贡献指南
调研方向
首先阅读现有的 GIDSignIn currentUser、restorePreviousSignIn 和 signIn API,以了解一个账户的状态如何被存储和恢复。当多个 GIDGoogleUser 账户可以保持登录、通过标识符进行选择、一起恢复,并且可以在不再次提示登录的情况下切换时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- objective-c
- 领域
- authentication, mobile
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100