Apple Sign In — web redirect
Redirect the browser to Apple's sign-in page. After approval, Apple posts back to `/oauth/apple/callback` which issues tokens and redirects to the app.
Response Body
application/json
curl -X GET "https://example.com/api/v1/auth/oauth/apple"nullCurrent user GET
Return the authenticated user's core fields and full profile, including `role`. Use this immediately after sign-in to determine which UI to display: - `patient` → patient mobile app - `doctor` → doctor dashboard (web) + patient app (mobile for own data) - `clinic_staff` → doctor dashboard (read-only) + patient app - `clinic_admin` → doctor dashboard (full) + patient app - `admin` → admin panel Note: doctors, clinic staff, and clinic admins can all use the patient mobile app to track their **own** health data.
Apple Sign In — web callback POST
Apple form-posts here after consent. Verifies the identity token, upserts the user, then redirects to the web app with Avycenna tokens in the URL fragment.