Authentication
The kit uses Supabase for authentication. By default, it uses anonymous authentication — which is the recommended approach for apps with paywalls and onboarding flows.Why Anonymous Auth is the Default
Most successful subscription apps follow this pattern:- Don’t see a login screen before they understand your app’s value
- Can complete onboarding and see the paywall without friction
- Get a seamless experience that maximizes conversion
Anonymous users are real users. They have a unique ID, can make purchases, and their data persists. The only difference is they didn’t enter an email/password.
When to Use Anonymous Auth
| Use Case | Recommendation |
|---|---|
| Subscription app with paywall | ✅ Anonymous (default) |
| Content/media app | ✅ Anonymous |
| Social app requiring profiles | ❌ Use email/social auth |
| App with user-generated content | ❌ Use email/social auth |
| Enterprise/B2B app | ❌ Use email/social auth |
Authentication Options
The kit supports multiple auth methods. Enable them inconfig/app.config.ts:
Available Methods
Anonymous
No sign-in required. Default and recommended.
Email + Password
Traditional email/password authentication
Apple Sign In
One-tap sign in for iOS users
Google OAuth
Sign in with Google account
How It Works
Anonymous Auth
When the app launches, it automatically creates an anonymous user:Switching to Other Auth Methods
If you need users to sign in, setauth.mode to 'required':
Key Files
| File | Purpose |
|---|---|
lib/supabase.ts | Supabase client configuration |
lib/auth.ts | Auth utility functions (email, Apple, Google) |
contexts/auth-context.tsx | Auth state provider |
config/app.config.ts | Auth configuration |
components/auth/ | Reusable auth UI components |
app/auth/ | Full auth screens (login, signup, forgot-password) |
Using Auth in Your App
Get Current User
Check if Anonymous
Sign Out
UI Components
The kit includes ready-to-use auth components:Forms
Social Buttons
Divider
Account Linking (Coming Soon)
In a future update, anonymous users will be able to “upgrade” their account by linking an email or social provider — without losing their data or purchases.Next Steps
Apple Sign In
Set up Sign in with Apple
Google OAuth
Set up Google authentication
Email + Password
Set up email authentication