Commit graph

10 commits

Author SHA1 Message Date
67f24f4cd7 Fix: Improve better-auth integration and passkey flow
Adjusted the `BETTER_AUTH_URL` in `.env.example` to emphasize its
importance for proper functioning, especially for local development.

Updated the catch-all handler in
`apps/api/app/api/auth/[...all]/route.ts` to directly use the
`auth.handler` from `better-auth`, simplifying the configuration.

Corrected the file path for the TypeScript route definitions in
`apps/api/next-env.d.ts`.

In the iOS app, updated the API endpoints called for passkey sign-in and
registration in `AppState.swift` to include the `/api` prefix, ensuring
they match the backend routes.

Refactored `SignInView.swift` to provide a cleaner and more intuitive
user experience:
- Introduced a toggle (`usePasskey`) to switch between passkey and
  email/password authentication.
- Redesigned the UI with distinct sections for each authentication
  method.
- Enhanced the email and password form with better styling and
  validation feedback.
- Added a "Continue" button for email/password sign-in and "Continue
  with Passkey" for passkey authentication.
- Modified the `authenticate` and `authenticateWithPasskey` functions to
  correctly invoke the `AppState` methods.

Updated `SignUpView.swift` to use the `authenticate` method for
consistency, which handles both sign-up and sign-in flows.
2026-04-13 19:10:33 +01:00
a59c092172 Fix: Configure passkey RPID and origin
Set `rpID` and `rpName` for passkey authentication. This is crucial for
WebAuthn to correctly identify the relying party and establish secure
credentials. Additionally, set the `origin` to ensure consistent
communication between the client and server during passkey operations.
2026-04-13 18:38:46 +01:00
f24779f26a Refactor: Import auth schema for Drizzle 2026-04-13 18:34:58 +01:00
f3a304d613 feat: Add better-auth Drizzle schema
This commit introduces the Drizzle ORM schema for the `better-auth`
library. This includes tables for users, sessions, accounts,
verification, organizations, members, invitations, and passkeys, along
with their respective relations.

This schema provides the foundational database structure for user
authentication and authorization within the application, enabling
features like passkey sign-in, organization management, and invitation
handling.
2026-04-13 18:28:47 +01:00
516033d0c5 Fix: Disable 2026-04-13 18:10:35 +01:00
90c99eaa02 feat: Add @simplewebauthn/server dependency
Includes the addition of `@simplewebauthn/server` to the backend's
package.json. This library is essential for handling WebAuthn
operations, enabling passkey authentication.
2026-04-13 18:03:55 +01:00
200650dc38 Fix: Import passkey plugin from correct package
The passkey plugin was previously imported from `better-auth/plugins`
instead of its dedicated package `@better-auth/passkey`. This change
corrects the import path to resolve the issue.
2026-04-13 18:00:18 +01:00
b4936e4dc2 restore docker-entrypoint.sh 2026-04-13 17:57:53 +01:00
88701de549 chore: clean up project structure
- Remove duplicate iOS app folder (ShopList/ → consolidated to Bagsy/)
- Remove build artifacts from git tracking
- Remove stale documentation files
- Remove old React Native mobile code
- Add PROJECT_STATUS.md for clear project overview

iOS app is now clearly organized under apps/ios/Bagsy/ with single Xcode project (Bagsy.xcodeproj)
2026-04-13 17:16:11 +01:00
5f1ca81e8f i call bagsy on the initial commit 2026-03-27 17:05:28 +00:00