{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Sign a family member in to ILLI from the native family app without the PDN's OAuth sign-in and consent screen: the app presents the member's scoped familyApp app password (which it keeps) and its platform attestation; the Service Agent Node opens the session, joins the account to the service sphere on first use and returns the family session. Used at first connection and at every re-login. Web clients use the OAuth BFF (/oauth/login) instead.",
      "errors": [
        {
          "name": "InvalidAppPassword"
        },
        {
          "name": "WrongScope"
        },
        {
          "name": "InvalidAttestation"
        },
        {
          "name": "RateLimitExceeded"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "appPassword": {
              "type": "string"
            },
            "attestation": {
              "description": "App attestation: production = a Play Integrity token or an App Attest attestation object bound to the nonce from account.getAttestationNonce; PoC = mock:family:<secret>.",
              "type": "string"
            },
            "did": {
              "format": "did",
              "type": "string"
            }
          },
          "required": [
            "did",
            "appPassword",
            "attestation"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "did": {
              "format": "did",
              "type": "string"
            },
            "expiresAt": {
              "format": "datetime",
              "type": "string"
            },
            "handle": {
              "format": "handle",
              "type": "string"
            },
            "token": {
              "description": "The family session token for native clients; web clients receive it as the illi_session cookie.",
              "type": "string"
            }
          },
          "required": [
            "did",
            "handle"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "ai.newnal.illi.account.family.signIn",
  "lexicon": 1
}
