-
Notifications
You must be signed in to change notification settings - Fork 0
Auth: Mobile — Login + Register screens (AuthStack) #130
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Auth System — Mobile Step 1
Replace the hardcoded role-picker with real login/registration screens.
New screens:
mobile/screens/auth/LoginScreen.tsx— email/phone + passwordmobile/screens/auth/RegisterScreen.tsx— invite-based registrationmobile/screens/auth/ForgotPasswordScreen.tsx— password reset
Navigation change:
Root Navigator
├── AuthStack (unauthenticated)
│ ├── LoginScreen
│ ├── RegisterScreen
│ └── ForgotPasswordScreen
└── AppStack (authenticated)
├── WorkerStack
├── ForemanStack
├── FarmStack
└── SupplyStack
Remove: current role-picker in App.tsx, hardcoded user IDs
Auth state on app launch:
- Show splash screen
- Check SecureStore for refresh token
- If found → call /api/auth/refresh → success → AppStack
- If missing or failed → AuthStack
Active stack determined by user's highest-privilege role at selected farm (from login response roles array).
i18n: All new screens use existing i18n setup (add keys to en.json/es.json)
Depends on: Backend auth endpoints
Design doc: docs/AUTH.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request