FormidableLabs / FormidableLabs/react-native-app-auth

Error: JSON deserialization error (Android)

Đang mở
#752 8 bình luận 3 reaction 0 người được giao Xem trên GitHub
question stale
Ngôn ngữ chính
Java
Star
2.3k
Fork
473
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu từ đường dẫn Android authorize(config) và điều tra lỗi giải tuần tự JSON liên quan đến phản hồi token COROS, đặc biệt là tokenAdditionalParameters. So sánh cách xử lý trên Android với phản hồi iOS đang hoạt động; hoàn tất khi việc ủy quyền thành công trên Android và trả về các trường token như mong đợi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
android, react-native
Lĩnh vực
authentication, mobile
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.