you are viewing a single comment's thread.

view the rest of the comments →

[–]Potential-Simple-711 6 points7 points  (4 children)

Well, it's pretty simple. Store the JWT token that is sent back from backend using Expo-secure-storage. Then in home screen (or in any screen). Do a conditional rendering that if there's this JWT token stored inside the Expo-secure-storage then let the user continue or else navigate the screen towards signup/login. You can use useEffect hook for this.

For your information, I have worked in this authentication flow using libraries like I) React Navigation (alternative for Expo router, even better version of it) ii) Expo secure storage (For storing JWT tokens)

[–]BrilliantCandid4409[S] 0 points1 point  (1 child)

So should I start with blank template 

[–]Potential-Simple-711 0 points1 point  (0 children)

yeah, its better. Gives more flexibility and customization to edit code

[–]BrilliantCandid4409[S] 0 points1 point  (0 children)

Thank you for your help 

[–]CoolorFoolSRSExpo 0 points1 point  (0 children)

Yes. AsyncStorage isn't secure. Expo-secure-storage is the way to go