You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A full-featured CRUD application built with React Native, Expo Router, NativeWind, Drizzle ORM, and SQLite. Create, read, update, and delete records with a clean, production-ready mobile interface.
16
+
A <strong>starter boilerplate</strong> 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.
17
17
</p>
18
18
19
+
> ⚠️ **This is a starting point.** Before shipping to production, review the [Security Considerations](#security-considerations) section below. Several intentional simplifications were made to keep this boilerplate approachable.
20
+
19
21
---
20
22
21
23
<h2id="stack">
@@ -30,15 +32,75 @@
30
32
31
33
---
32
34
35
+
<h2id="security-considerations">
36
+
Security Considerations
37
+
</h2>
38
+
39
+
This project is intentionally simplified. Before using it as a base for a real-world app, you should address the following:
40
+
41
+
### Password Hashing
42
+
43
+
Currently, passwords are hashed using `Crypto.CryptoDigestAlgorithm.SHA256` via `expo-crypto`. **SHA-256 is not suitable for password hashing in production** — it is fast by design, which makes brute-force attacks trivial.
44
+
45
+
> The `argon2` npm package is **not compatible with React Native** as it relies on Node.js native bindings (C++). Use one of the alternatives below instead.
> SHA-512 is still not ideal for password hashing, but significantly better than SHA-256 when combined with a unique per-user salt stored alongside the hash.
77
+
78
+
**Option 3 — Backend authentication** (most secure for production):
79
+
Move auth entirely to a server (Node.js, Go, etc.) where Argon2id runs natively, and have the app communicate via HTTPS. Services like [Supabase](https://supabase.com) or [Firebase Auth](https://firebase.google.com/products/auth) handle this out of the box.
80
+
81
+
> Argon2id is the current recommendation from [OWASP](https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html) and [RFC 9106](https://www.rfc-editor.org/rfc/rfc9106).
82
+
83
+
### Other Areas to Improve Before Production
84
+
85
+
-**Password reset tokens** — currently passed via route params (visible in navigation). Consider storing them only server-side or using a deeper link strategy.
86
+
-**Session management** — sessions are stored in SQLite with no expiry. Add a `expiresAt` column and invalidate stale sessions.
-**Rate limiting** — no protection against brute-force login attempts exists in a local-first setup; consider adding attempt counters.
89
+
-**Token expiry** — reset tokens expire after 15 minutes by default; adjust as needed for your use case.
90
+
-**No email verification** — there is no email confirmation step on sign up.
91
+
-**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).
0 commit comments