Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Google error 401 - The server cannot process the request because it is malformed. It should not be retried.

Aperta
#1,111 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 24 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
android, react-native

Direzione di ricerca

Inizia dal flusso di autorizzazione e dalla socialConfig fornita, in particolare dall’endpoint di autorizzazione Cognito, da Google identity_provider e dalle impostazioni di prompt. Riproducilo su un dispositivo fisico Android API 36 con Google Sync attivo, scegliendo “Add another account” e accettando i termini nativi di Google Play Services. È completato quando il flusso torna all’app/Cognito invece di mostrare la pagina Google 401 relativa alla richiesta non valida.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Google 401 Malformed Request on Android when adding new account (Cognito + Google Sync)

Image
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
  1. Trigger the login flow using authorize with Google/Cognito.
  2. When the Google account selector appears, instead of picking an existing account, select "Add another account".
  3. Complete the Android system's native verification (fingerprint/PIN).
  4. Enter the new account credentials.
  5. The Android system displays a native "Terms and Conditions" / "Google Play Services" acceptance screen.
  6. 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.
Lingua principale
Java
Stelle
2.3k
Fork
473
Merge medio
23g 15h
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di FormidableLabs/react-native-app-auth

Tutte le issue di FormidableLabs/react-native-app-auth

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.