Google error 401 - The server cannot process the request because it is malformed. It should not be retried.
Les mainteneurs répondent en général sous 24 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- android, react-native
- Domaine
- authentication, mobile
Piste de recherche
Commencez par le flux d’autorisation et la socialConfig fournie, en particulier l’endpoint d’autorisation Cognito, Google identity_provider et les paramètres de prompt. Reproduisez le problème sur un appareil Android API 36 physique avec Google Sync actif, en choisissant « Add another account » et en acceptant les conditions natives de Google Play Services. C’est terminé lorsque le flux revient à l’application/Cognito au lieu d’afficher la page Google 401 de requête mal formée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Java
- Étoiles
- 2.3k
- Forks
- 473
- Merge moyen
- 23 j 15 h
- PR mergées (30 j)
- 2
Préparer son environnement
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de FormidableLabs/react-native-app-auth
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
FormidableLabs/react-native-app-auth#1147 ·
Les mainteneurs répondent en général sous 24 jours
-
Difficulté 4/5 3-5 jours Accessibilité débutants 62/100
FormidableLabs/react-native-app-auth#1126 ·
Les mainteneurs répondent en général sous 24 jours
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
FormidableLabs/react-native-app-auth#1118 ·
Les mainteneurs répondent en général sous 24 jours
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
FormidableLabs/react-native-app-auth#1108 · 1 commentaire ·
Les mainteneurs répondent en général sous 24 jours
-
Difficulté 4/5 3-5 jours Accessibilité débutants 28/100
FormidableLabs/react-native-app-auth#1107 ·
Les mainteneurs répondent en général sous 24 jours
Toutes les issues de FormidableLabs/react-native-app-auth
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
feature triaged
Difficulté 1/5 Moins d'une heure Accessibilité débutants 75/100
Graylog2/graylog2-server#27549 ·
Les mainteneurs répondent en général sous 1 jour
-
component/zeebe kind/bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
UniversalMediaServer/UniversalMediaServer#6356 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
googleapis/google-cloud-java#14533 ·
Les mainteneurs répondent en général sous 1 jour