---
title: "Social Auth"
method: POST
path: "/api/v1/auth/social"
tags: ["auth"]
---

# Social Auth

`POST /api/v1/auth/social`

## Request

- Base URL: `https://yondry.app` (the document declares no server; this is the origin it was published from)
- URL: `https://yondry.app/api/v1/auth/social`
- Auth: none declared

Sign in with Apple or Google.

The mobile client obtains an id_token from the provider SDK and forwards
it here. The backend verifies the token, finds or creates the user, and
returns a token pair identical to the email/password login response plus
a ``user`` block and ``is_new_user`` flag so the client can route to
onboarding when appropriate.

## Request body

- SocialAuthRequest
  - `provider` 'apple' | 'google', required
  - `id_token` string, required
  - `display_name` string, nullable

## Response `200`

Successful Response

- SocialAuthResponse
  - `access_token` string, required
  - `refresh_token` string, required
  - `token_type` string
  - `user` UserAuthInfo, required: Minimal user representation returned inside SocialAuthResponse.
    - `id` string, uuid, required
    - `email` string, required
    - `display_name` string, nullable, required
    - `avatar_url` string, nullable, required
    - `onboarding_completed` boolean, required
    - `auth_provider` string, required
  - `is_new_user` boolean, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/yondry/apis/yondry-api.md) · [All operations](https://skmtc.dev/yondry/apis/yondry-api/llms.txt) · [OpenAPI document](https://skmtc.dev/yondry/apis/yondry-api/revisions/d2c213cea95b?raw)
