Auth Views
LoginView
File: Views/Auth/LoginView.swift
The login screen with email/password form and social sign-in buttons.
Features
- Email and password text fields
- “Sign In” and “Create Account” buttons
- “Sign in with Apple” button (native
ASAuthorizationButton) - “Sign in with Google” button
- Error message display
- Loading state indicator
Flow
- User enters credentials or taps social login
AuthViewModelhandles authentication- On success, navigates to
ContentView(tabs) - On failure, shows error message
AppleSignInButton
File: Views/Auth/AppleSignInButton.swift
Wraps the native ASAuthorizationAppleIDButton in a SwiftUI view. Uses AppleSignInDelegate to manage the ASAuthorizationController flow.
Sign-In Process
- Presents native Apple Sign In sheet
- User authenticates with Face ID / Touch ID
- Returns
ASAuthorizationwith identity token - Token is passed to Supabase Auth via
signInWithIdToken - Supabase creates/matches user account
- Profile trigger creates
profilesrow