google / google/GoogleSignIn-iOS

How to re-auth user if scopes have already been granted

オープン
#262 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug triage
主要言語
Objective-C
スター
750
フォーク
282
平均マージ
2日 15時間
マージ済み PR(30日)
9

説明

**Describe the bug**
I am asking for permission for Youtube scopes. Youtube has multiple sub accounts under one email.

If I request scopes for a second time, the API sends:

case scopesAlreadyGranted = -8
Indicates the requested scopes have already been granted to the currentUser.
[kGIDSignInErrorCodeScopesAlreadyGranted](https://developers.google.com/identity/sign-in/ios/reference/Enums/GIDSignInErrorCode#/c:@E@GIDSignInErrorCode@kGIDSignInErrorCodeScopesAlreadyGranted)

How do I let a user re-authenticate under a sub email of the YT scope permissions?

**To Reproduce**
Steps to reproduce the behavior:

GIDSignIn.sharedInstance.addScopes(
self.additionalScopes,
presenting: self,
callback: { user, error in
})

**Expected behavior**
Authenticate a sub email under the main email of the Google sign in.

For example: If a user signs out. I would like to re show or re-access the sub emails under the addScopes function.
Essentially, I would like to ask for scopes a second time.

**Screenshots**
![Screen Shot 2022-11-28 at 8 12 19 PM](https://user-images.githubusercontent.com/60942618/204437066-d138cc21-7df0-446e-803f-2cb827396575.png)

**Environment**
- OS: iOS Swift

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。