FormidableLabs / FormidableLabs/react-native-app-auth
Error: JSON deserialization error (Android)
- Vorherrschende Sprache
- Java
- Sterne
- 2.3k
- Forks
- 473
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
## 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
Beitragsleitfaden
Rechercherichtung
Beginne beim Android-Pfad authorize(config) und untersuche den Fehler bei der JSON-Deserialisierung rund um die COROS-Tokenantwort, insbesondere tokenAdditionalParameters. Vergleiche die Android-Behandlung mit der funktionierenden iOS-Antwort; abgeschlossen ist die Aufgabe, wenn die Autorisierung auf Android erfolgreich ist und die erwarteten Tokenfelder zurückgibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- android, react-native
- Bereich
- authentication, mobile
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100