gitpoint / git-point

GitHub in your pocket :iphone:
https://gitpoint.co/
MIT License
4.72k stars 787 forks source link

Login problem since RN 0.59 #913

Open chinesedfan opened 4 years ago

chinesedfan commented 4 years ago

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,

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

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