gitpoint / gitpoint/git-point

Login problem since RN 0.59

Đang mở
#913 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
:bug: bug
Ngôn ngữ chính
JavaScript
Star
4.8k
Fork
770
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Backgrounds

The current designed login process,

1. In login screen, visit Github's login url with a callback schema by WebView and listen to `onNavigationStateChange`
- Before #323, use `Linking` in Android and `react-native-safari-view` in iOS, then listen on Linking in both platforms
- Why still listening on Linking in Android? Because in Android, we have a `can't login` button
2. If succeed to login, it will,
1. jump to the schema, `gitpoint://welcome`, which means the welcome screen
2. trigger onNavigationStateChange to get the auth, and navigate to `Main`

I guess the stack navigator guarantees the main screen will always on the top of the welcome screen.

### Problem

I tested different versions of codes and found that starting from #883, with RN 0.59,

- In iOS, onNavigationStateChange is not triggered for the schema
- In Android, every onNavigationStateChange is triggered but Main can't cover Welcome

Users will be blocked by the welcome screen after login in. The workaround is killing the app and open again. It has logged in so will navigate to the main screen at the second time.

### Related

- No tag for v1.6.0, according to translation texts, it should be > 1716618 and < ecb61fa
- The most likely commit is 67a17ae
- Used try to make `Welcome` be able to navigate to `Main`(35e4a08)
- Works well in iOS, it will only try to auth in the welcome screen
- But in Android, it will try to auth twice (both in login and welcome screen)

Future direction should be replacing the WebView login with native implementations.

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

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

Hướng nghiên cứu

Bắt đầu bằng việc xem xét các thay đổi liên quan đến #883 và các commit 67a17ae và 35e4a08, sau đó tái hiện luồng đăng nhập trên iOS và Android với React Native 0.59. Được coi là hoàn tất khi đăng nhập thành công đến Main mà không yêu cầu khởi động lại ứng dụng và không kích hoạt xác thực hai lần.

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

Đánh giá

Công nghệ
javascript, 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.