Description
Add Clerk for authentication across web and mobile clients.
Considerations
Backend
- Sync Clerk user IDs with existing users table
- Verify Clerk JWT tokens in API middleware
- Handle user creation webhook from Clerk -> populate users table with metadata
- Update user model to include external auth ID reference
Web
Mobile
- Look into
@clerk/clerk-expo
- Also referenced here in Clerk docs
- Configure Clerk provider in
app/_layout.tsx
- Consider OAuth redirects
Shared
- Update API client to attatch Clerk session tokens to requests
- Add auth utilities for token management
DB
- Migration for Clerk user id's
Description
Add Clerk for authentication across web and mobile clients.
Considerations
Backend
Web
@clerk/clerk-react<ClerkProvider>Mobile
@clerk/clerk-expoapp/_layout.tsxShared
DB