A starter boilerplate for authentication in React Native, built with Expo Router, NativeWind, Drizzle ORM, and SQLite. Includes sign up, sign in, sign out, forgot password, and reset password flows — designed as a solid foundation to build on, not a production-ready solution out of the box.
⚠️ This is a starting point. Before shipping to production, review the Security Considerations section below. Several intentional simplifications were made to keep this boilerplate approachable.
This project is intentionally simplified. Before using it as a base for a real-world app, you should address the following:
Passwords are hashed using react-native-argon2 with Argon2id, which is the current recommendation from OWASP and RFC 9106.
- Password reset tokens — currently passed via route params (visible in navigation). Consider storing them only server-side or using a deeper link strategy.
- Session management — sessions are stored in SQLite with no expiry. Add a
expiresAtcolumn and invalidate stale sessions. - Input validation — add stricter password rules (min length, complexity) via Zod schemas.
- Rate limiting — no protection against brute-force login attempts exists in a local-first setup; consider adding attempt counters.
- Token expiry — reset tokens expire after 15 minutes by default; adjust as needed for your use case.
- No email verification — there is no email confirmation step on sign up.
- Local-only — this project uses SQLite with no backend. For multi-device or server-side auth, you will need to integrate a backend (e.g., Supabase, Firebase, or a custom API).
git clone https://github.com/Victor-Zarzar/react-native-basic-auth
cd react-native-basic-authbun ibun run db:generate# iOS (native build)
bun run ios:native
# Android (native build)
bun run android:native| Script | Description |
|---|---|
bun run android |
Start on Android Emulator |
bun run ios |
Start on iOS Simulator |
bun run web |
Start on Web |
bun run db:generate |
Generate Drizzle ORM migration files |
bun run upgrade-deps |
Fix and align dependencies with Expo SDK |
bun run prebuild |
Rebuild native directories with Expo Prebuild |
bun run ios:native |
Run native iOS build |
bun run android:native |
Run native Android build |
bun run lint |
Check code with Biome |
bun run lint:fix |
Auto-fix lint issues with Biome |
bun run format |
Format code with Biome |
bun run typecheck |
Run TypeScript type checking |
bun test |
Run tests with Bun |
- React Native – Cross-platform mobile framework
- Expo SDK 55 – Development platform and tooling
- Expo Router – File-based routing
- TypeScript – Type-safe development
- NativeWind – Tailwind CSS for React Native
- SQLite (Expo SQLite) – Local persistent storage
- Drizzle ORM – Type-safe ORM for SQLite with migration support
- React Native Argon2 – Argon2id password hashing
- React Native Reusables – Accessible UI component system
- Complete auth flow — Sign Up, Sign In, Sign Out, Forgot Password, Reset Password
- Local data persistence with SQLite via Expo SQLite
- Type-safe database queries with Drizzle ORM
- Drizzle Studio integration via
expo-drizzle-studio-pluginfor database inspection during development - Password hashing with Argon2id via
react-native-argon2 - Production-ready scalable structure
- File-based routing with Expo Router
- Dark mode support
- Reusable component system preconfigured
- Edge-to-edge support
- New Architecture enabled (Fabric + TurboModules)
- Cross-platform (iOS, Android, Web)
Before starting, ensure you have:
- Node.js (v24+)
- npm or Bun
- Expo CLI
- iOS Simulator (Mac) or Android Emulator
- Git
This project uses Drizzle ORM on top of Expo SQLite for type-safe, local database operations.
After modifying the schema, run:
bun run db:generateThis will generate SQL migration files inside the drizzle/ folder using Drizzle Kit.
With the development server running, press Shift + M in the terminal to open the Dev Tools menu, then select expo-drizzle-studio-plugin from the list. Drizzle Studio will open in a new browser tab, allowing you to browse and manage your local SQLite database visually.
Note: This plugin is available during native development only (iOS/Android). It does not work on Web.
bunx react-native-reusables/cli@latest add input textareaInstall all components:
bunx react-native-reusables/cli@latest add --allnpm install -g eas-cli
eas login
eas buildDocumentation: https://docs.expo.dev/eas/
- Fork the project
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Victor Zarzar - @Victor-Zarzar
Project Link: https://github.com/Victor-Zarzar/react-native-basic-auth
