gitpoint / gitpoint/git-point

Login problem since RN 0.59

オープン
#913 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
:bug: bug
主要言語
JavaScript
スター
4.8k
フォーク
771
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず #883 周辺の変更とコミット 67a17ae、35e4a08 を確認し、その後 React Native 0.59 を使用して iOS と Android でログインフローを再現します。ログインが成功してアプリの再起動を必要とせずに Main に到達し、認証が二重に実行されなければ完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, react-native
領域
authentication, mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。