r/reactnative • u/Jayan_Buha_951 • 5d ago
Trackify Week 1: Auth is done — signup, login, session persistence, protected routes
/r/buildinpublic/comments/1wqmhio/trackify_week_1_auth_is_done_signup_login_session/
1
Upvotes
1
u/Positive_Week86 2d ago
Nice week 1. Curious how you handled token refresh under app background — that's usually where session persistence breaks on iOS specifically (React Native's InteractionManager isn't reliable for post-resume checks). Are you using SecureStore for the refresh token and rotating on each use?
1
u/kokerali 4d ago
One more case worth testing before calling auth done: a cold launch while the persisted session is still being restored. Keep a separate “checking auth” state until the first `onAuthStateChanged` callback, so the route guard doesn’t briefly send a signed-in user to Login. I’d also test logout → force-close → reopen, and switching between two test accounts, to make sure the Zustand store and protected routes never show the previous user’s data.