-
Notifications
You must be signed in to change notification settings - Fork 82
Mobile Auth Navigation Bootstrap
How the app starts, authenticates, and routes. Part of Mobile Overview.
-
index.jsregisters push background handlers (setBackgroundMessageHandler,notifee.onBackgroundEvent) beforeAppRegistry.registerComponent. -
App.tsxis the real bootstrap: initializes SuperTokens (initSuperTokens) and the social providers (configureSocialProviders), loads remote mobile config (fetchMobileConfig), resolves the API base URL intoAPI_CONFIG, evaluates the app-update prompt, initializes PostHog + Stripe, and mounts the provider tree:Provider(store)→PersistGate→GestureHandlerRootView→SafeAreaProvider→AuthProvider→PreferencesProvider→GlobalLoaderProvider→AppUpdateGate→NotificationBootstrap→StripeProvider→NavigationContainer→AppContent(rendersAppNavigatorinside anErrorBoundary).
src/features/auth/:
-
authSlice.ts(authslice),thunks.ts(initializeAuth,establishSession,refreshSession,updateUserProfile,logout),selectors.ts,sessionManager.ts(token freshness,getFreshStoredTokens,isTokenExpired). -
context/AuthContext.tsx—AuthProvider/useAuth(isLoggedIn,user,AuthTokens). - Services:
superTokensClient.ts(SDK init),authUserService.ts,passwordlessAuth.ts,socialAuth.ts(configureSocialProviders),tokenStorage.ts,accountDeletion.ts; hookuseSocialAuth.ts. - Screens:
SignInScreen,SignUpScreen,CreateAccountScreen,OTPVerificationScreen.
The auth backbone is SuperTokens (supertokens-react-native) since the SuperTokens migration landed (PR #1763, merged 2026-07-16): superTokensClient.ts initializes the SDK, passwordlessAuth.ts drives email-OTP sign-in, and socialAuth.ts exchanges Google/Apple credentials through SuperTokens signinup (exchangeWithSuperTokens). The former Amplify (Cognito) and Firebase auth paths survive only as legacy stored-token cleanup (tokenStorage.ts LegacyAuthProviderName, sessionManager.ts); Firebase otherwise remains for push messaging.
React Navigation 7:
-
AppNavigator.tsx— root native stack withOnboarding,Auth,Main, choosing which to render from auth/onboarding state (useAuth,subscribeOnboarding,sessionManagertoken freshness), and mountingEmergencyProvider,NetworkProvider, and co-parent invite handling. -
AuthNavigator.tsx—SignIn,SignUp,OTPVerification,CreateAccount,TermsAndConditions,PrivacyPolicy. -
TabNavigator.tsx— bottom tabs with a customFloatingTabBar:HomeStack,Appointments,Documents,Tasks, each a nested native stack. - Per-feature stacks:
HomeStackNavigator,AppointmentStackNavigator,DocumentStackNavigator,TaskStackNavigator,ExpenseStackNavigator,LinkedBusinessesStackNavigator,AdverseEventStackNavigator. All param lists live insrc/navigation/types.ts; onboarding state innavigation/onboardingStore.ts.
Home · Architecture · ADRs · Plans · Roadmap · Contributing · Main repo · DeepWiki · Discord
Yosemite Crew is a product of DuneXploration UG (haftungsbeschränkt). This wiki mirrors the repository; where a page and the repo disagree, the repo wins. See the Wiki Style Guide.
Product & Domain
Architecture
Applications
- Backend — Overview
- Frontend / PIMS Web — Overview
- Mobile — Overview
- Desktop PIMS Shell
- Developer Portal
- SuperAdmin
Design & Accessibility
Engineering Handbook
Decisions (ADRs)
Design Docs & Plans
Meta
Canonical code & docs: main repo · Auto-generated companion: DeepWiki