firebase / firebase/FirebaseUI-Flutter
Inconsistent behavior of providers using GoogleProvider() and AppleProvider()
- 主要言語
- Dart
- スター
- 151
- フォーク
- 141
- 平均マージ
- 2日 11時間
- マージ済み PR(30日)
- 6
説明
### Is there an existing issue for this?
- [X] I have searched the existing issues and found no duplicates.
### What plugin is this bug for?
Firebase UI OAuth Google, Firebase UI OAuth Apple
### What platform(s) does this bug affect?
Android, iOS
### List of dependencies used.
flutter pub deps -s list
firebase_core: ^2.10.0
firebase_auth: 4.12.1
firebase_ui_auth: ^1.1.8
firebase_ui_oauth: ^1.1.8
firebase_ui_oauth_google: ^1.0.15
firebase_ui_oauth_apple: ^1.0.15
### Steps to reproduce
Setup the standard SignInScreen of FirebaseUIAuth with successfully configured providers GoogleProvider(clientId:) and AppleProvider() and login the existing user with the signInAnonymously method beforehand.
On the SignInScreen, using the "Sign in with Apple" option, the account is permanently created in the user management and successfully upgraded / linked to the provider. Logging in on another device after that (while being again anonymously logged in before, too) the anonymous login is overwritten in favor of the recently created account, linked with the apple provider.
However, trying the same using the GoogleProvider, the behavior seems to differ and I hope someone can either explain this behavior to me or look into the issue.
### Expected Behavior
It is expected that the GoogleProvider works exactly the same as the AppleProvider in case of Sign-up, linking and especially signing in again on a different device using the same credentials.
### Actual Behavior
Signing in with the GoogleProvider on another device leads to an "credentials-already-in-use" error of the framework, indicating that the credentials belong to another account and therefore cannot be linked to another (anonymous) user.
In contrast to AppleProvider, the GoogleProvider doesn't seem to recognize that the user tries to sign-in with existing credentials, so it seems impossible to sign-in with GoogleProvider like it is with AppleProvider.
Same holds true if you log out of your existing account, being automatically logged in anonymously again immediately by the app, then trying to sign-in using the same credentials used some minutes ago.
### Additional Information
_No response_
コントリビューションガイド
調査の方向性
まず、SignInScreen、GoogleProvider(clientId:)、AppleProvider() で説明されているフローを再現します。1 台のデバイスで最初に匿名でサインインし、その後、別のデバイスで同じ認証情報を使用します。リンク時とサインイン時の provider の動作を、credentials-already-in-use エラーも含めて比較します。Google が既存の認証情報を Apple と一貫して処理し、新しい匿名アカウントへのリンクを誤って試みないことを確認できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- dart, firebase, flutter
- 領域
- authentication, mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100