signInWithCredential get stuck
- 主要言語
- TypeScript
- スター
- 7.8k
- フォーク
- 2.2k
- 平均マージ
- 22時間 28分
- マージ済み PR(30日)
- 6
説明
# Version info
"@angular/core": "19.2.3"
"@angular/fire": "^19.0.0",
"firebase": "^10.14.1",
"@ionic/angular": "^8.3.4",
"@capacitor/core": "^6.1.0",
# Code
```
import { Auth, GoogleAuthProvider, signInWithCredential, signInWithPopup, UserCredential } from '@angular/fire/auth';
private auth = inject(Auth); //* Firebase Auth instance
async loginWithGoogle(): Promise {
SummonLogger.trace('auth.service.ts', 'loginWithGoogle');
try {
const provider = new GoogleAuthProvider();
if (!Capacitor.isNativePlatform()) {
return signInWithPopup(this.auth, provider);
} else {
// Native auth (capacitor)
await this.initGoogleProvider();
await this.clearGoogleSocialLoginSession();
const res = await SocialLogin.login({ provider: 'google', options: {} });
this.provider = 'google';
const googleResult = res.result as GoogleLoginResponse;
const credential = GoogleAuthProvider.credential(googleResult.idToken);
return await signInWithCredential(this.auth, credential);
}
} catch (error) {
SummonLogger.error('auth.service.ts', 'loginWithGoogle() - error', error);
return Promise.reject(error);
}
}
```
# Issue
When the signInWithCredential method is invoked, the device becomes unresponsive, seemingly freezing in place. Despite this halt in functionality, no error messages or alerts are displayed to indicate the problem.
コントリビューションガイド
調査の方向性
auth.service.ts の loginWithGoogle メソッドから開始し、指定された Angular、Firebase、Ionic、Capacitor のバージョンでネイティブパスを再現します。SocialLogin.login、GoogleAuthProvider.credential、signInWithCredential の周辺の動作を比較し、デバイスが応答しなくならないこと、および失敗時にエラーが発生することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, firebase, typescript
- 領域
- authentication, mobile-dev
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100