Google error 401 - The server cannot process the request because it is malformed. It should not be retried.
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- android, react-native
- 領域
- authentication, mobile
調査の方向性
提供されている socialConfig と認可フローから始め、特に Cognito の認可エンドポイント、Google identity_provider、prompt の設定を確認します。Google Sync が有効な物理 Android API 36 デバイスで、「Add another account」を選択し、ネイティブの Google Play Services の規約に同意して再現します。フローが Google 401 malformed-request ページを表示するのではなく、アプリ/Cognito に戻れば完了です。
索引モデルが issue の本文から書いたものです。
説明
Google 401 Malformed Request on Android when adding new account (Cognito + Google Sync)
Description
I'm experiencing a 401 Malformed Request error specifically on Android when using AWS Cognito as an Identity Provider with Google.
The issue occurs only when the device has Google account synchronization active and the user attempts to add a new Google account during the sign-in process.
Steps to Reproduce
- Trigger the login flow using
authorizewith Google/Cognito. - When the Google account selector appears, instead of picking an existing account, select "Add another account".
- Complete the Android system's native verification (fingerprint/PIN).
- Enter the new account credentials.
- The Android system displays a native "Terms and Conditions" / "Google Play Services" acceptance screen.
- After accepting, instead of redirecting back to the app/Cognito, the browser displays a Google 401 error.
Observations
- The issue does not happen if an existing account from the list is selected.
- The issue does not happen on iOS.
- Other providers (Microsoft, Apple) work perfectly.
- The redirected URL in the browser shows
authuser=unknown, suggesting the session context is lost when the Android System Assistant takes over the UI focus.
Error URL (Redacted)
https://accounts.google.com/signin/oauth/consent?authuser=unknown&part=...&flowName=GeneralOAuthFlow&client_id=REDACTED.apps.googleusercontent.com&requestPath=%2Fsignin%2Foauth%2Fconsent#
Code Snippet
const socialConfig = {
serviceConfiguration: {
authorizationEndpoint: `https://${COGNITO_URL}/oauth2/authorize`,
tokenEndpoint: `https://${COGNITO_URL}/oauth2/token`,
},
clientId: CLIENT_ID,
redirectUrl: REDIRECT_URL,
scopes: ['email', 'openid', 'profile'],
additionalParameters: {
identity_provider: 'Google',
prompt: 'select_account',
},
usePKCE: true,
};
const result = await authorize(socialConfig);
Environment
- Identity Provider:
Cognito - Platform experiencing the issue on:
Android - React Native Version:
0.83.1 - react-native-app-auth Version:
8.1.0 - Platform: Android (tested on API 36)
- Device: Physical device with Google Sync active.
- 主要言語
- Java
- スター
- 2.3k
- フォーク
- 472
- 平均マージ
- 3日 7時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
FormidableLabs/react-native-app-auth のほかの issue
-
iOS: redirect after a failed authorize() crashes the app (finished session kept as _currentSession)対応中かも @federicobartoli が 5 日前に担当しました。 オープン
難易度 3/5 半日 初心者へのやさしさ 35/100
-
[Android] AuthorizationService is never disposed: Custom Tabs bind leak breaks refresh() permanently after ~1000 calls対応中かも @pranshuchittora が 65 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 62/100
-
Android: opt-in Partial Custom Tab (bottom-sheet) for the authorization flow対応中かも @omeratt が 145 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
FormidableLabs/react-native-app-auth#1108 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
FormidableLabs/react-native-app-auth の issue をすべて見る
似ている issue
-
RRateLimiter acquire methods accept negative permits and raise available permits above the rate.対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 4 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
krahets/hello-algo#1993 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
NationalSecurityAgency/ghidra#9884 ·
メンテナーはふだん 2 日以内に返信
-
Status: Pending Review Type: Feature Request
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
OpenRefine/OpenRefine#8019 ·
メンテナーはふだん 1 日以内に返信
-
[TEMP] pin maven version to 3.9.x対応中かも @petrenyi-mark が今日担当しました。 オープン
難易度 2/5 1時間未満 初心者へのやさしさ 62/100