gitpoint / gitpoint/git-point

Login problem since RN 0.59

Ouverte
#913 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
:bug: bug
Langage dominant
JavaScript
Étoiles
4.8k
Forks
771
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par examiner les changements autour de #883 et les commits 67a17ae et 35e4a08, puis reproduisez le flux de connexion sur iOS et Android avec React Native 0.59. C’est terminé lorsqu’une connexion réussie atteint Main sans nécessiter le redémarrage de l’application et ne déclenche pas l’authentification deux fois.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript, react-native
Domaine
authentication, mobile
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.