FormidableLabs / FormidableLabs/react-native-app-auth
Error: JSON deserialization error (Android)
- Lingua principale
- Java
- Stelle
- 2.3k
- Fork
- 473
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## Issue
I am getting `JSON deserialization error` with the following on Android **ONLY** - iOS is working as expected.
```
export const config = {
issuer: 'https://opentest.coros.com',
clientId: 'XXX',
clientSecret: 'XXX',
redirectUrl: `com.myapp.staging://oauth`,
scopes: ['userInfo', 'runData'],
serviceConfiguration: {
authorizationEndpoint: `https://opentest.coros.com/oauth2/authorize`,
tokenEndpoint: `https://opentest.coros.com/oauth2/accesstoken`,
revocationEndpoint: `https://opentest.coros.com/oauth2/deauthorize`,
}
}
const result = await authorize(config)
```
Response I am expecting (I got this via iOS as it works):
```
{
"refreshToken": "XXX",
"scopes": [],
"accessToken": "XXX",
"idToken": "",
"tokenAdditionalParameters": {
"openId": "XXX"
},
"tokenType": "",
"authorizeAdditionalParameters": {},
"accessTokenExpirationDate": "2022-08-19T10:24:57Z"
}
```
I have a hunch it's related to the `tokenAdditionalParameters` but I'm not 100% sure.
Worth noting I can't see any network request to COROS using Flipper.
---
## Environment
* **Your Identity Provider**: COROS (https://coros.com/)
* **Platform that you're experiencing the issue on**: `Android`
* **Are you using Expo?** No
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dal percorso Android authorize(config) e analizza l’errore di deserializzazione JSON relativo alla risposta del token COROS, in particolare tokenAdditionalParameters. Confronta la gestione su Android con la risposta iOS funzionante; il lavoro è completato quando l’autorizzazione ha esito positivo su Android e restituisce i campi del token previsti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, react-native
- Ambito
- authentication, mobile
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100