> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thefaithapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Complete Hosted Auth Sign-In

> Verifies the Firebase ID token produced by the hosted sign-in page and returns a callback URL containing a short-lived authorization code.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/auth/complete
openapi: 3.1.0
info:
  title: TheFaithApp Partner API
  version: 1.0.0
  description: >-
    The v1 API for third-party apps that sign in TheFaithApp members and access
    church-scoped content and workflows.
  contact:
    name: TheFaithApp Support
    email: support@thefaithapp.com
servers:
  - url: https://api.thefaithapp.com
    description: Production
security:
  - apiKeyAuth: []
    bearerAuth: []
tags:
  - name: Hosted Auth
    description: Sign members in through the hosted TheFaithApp authentication flow.
  - name: Core Experience
    description: Load member context and the personalized home experience.
  - name: Content
    description: >-
      Read sermons, media, YouTube videos, devotionals, and streaming
      configuration.
  - name: Engagement
    description: Manage member favorites and devotional bookmarks.
  - name: Churches
    description: Read church profiles, public directory records, and branch information.
  - name: Events & Volunteers
    description: >-
      Browse events and volunteer opportunities, then manage registrations and
      commitments.
  - name: Notifications & Bulletins
    description: Read church and member notifications and published bulletins.
  - name: Prayer
    description: Submit a prayer request for the authenticated member.
  - name: Member Connections
    description: Manage the member’s campus and ministry connections.
  - name: Community Groups
    description: >-
      Discover groups and manage membership, feeds, attendance, study guides,
      and leader notes.
  - name: Community Preferences & Research
    description: >-
      Manage community preferences, summaries, and consent-based research
      participation.
  - name: Resource Sharing
    description: Offer shared resources and manage member loan requests and transitions.
  - name: Mutual Aid
    description: >-
      Manage needs and offers, private responses, safety reports, and member
      activity.
  - name: Analytics
    description: Record product analytics events and retrieve aggregate metrics.
  - name: Notification Analytics
    description: Record and summarize notification delivery, open, and click events.
paths:
  /v1/auth/complete:
    post:
      tags:
        - Hosted Auth
      summary: Complete Hosted Auth Sign-In
      description: >-
        Verifies the Firebase ID token produced by the hosted sign-in page and
        returns a callback URL containing a short-lived authorization code.
      operationId: postAuthComplete
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                client_key:
                  type: string
                  description: Client API key copied from Developer Access.
                redirect_uri:
                  type: string
                  description: The same saved callback URL used to start sign-in.
                  format: uri
                firebase_id_token:
                  type: string
                  description: Firebase ID token returned by the hosted sign-in page.
                state:
                  type: string
                  description: Optional state value to return unchanged.
                  maxLength: 2048
                code_challenge:
                  type: string
                  description: Optional PKCE challenge.
                  maxLength: 255
                code_challenge_method:
                  type: string
                  description: PKCE challenge method.
                  enum:
                    - plain
                    - S256
              required:
                - client_key
                - redirect_uri
                - firebase_id_token
            example:
              client_key: your-client-api-key
              redirect_uri: https://example.com/auth/callback
              firebase_id_token: firebase-id-token
              state: random-state
              code_challenge: base64url-sha256-challenge
              code_challenge_method: S256
      responses:
        '200':
          description: Hosted sign-in completed.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                redirect_to: >-
                  https://example.com/auth/callback?code=one-time-code&state=random-state
                member:
                  id: 1
                  name: Jane Doe
                  email: jane@example.com
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
      security: []
components:
  responses:
    Unauthorized:
      description: >-
        The API key or member bearer token is missing, invalid, expired, or
        belongs to another church.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: The member is authenticated but cannot perform this action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The requested resource was not found in the authenticated church.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError:
      description: One or more request fields failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      type: object
      description: >-
        Error response. Validation failures also include an `errors` object
        keyed by field name.
      properties:
        status:
          type: string
          example: Error
        message:
          type: string
          example: The request could not be completed.
        error:
          type:
            - string
            - 'null'
          example: null
        error_message:
          type:
            - string
            - 'null'
          example: null
        errors:
          type: object
          additionalProperties: true
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Client API key copied from Developer Access in the TheFaithApp
        dashboard.
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum
      description: Member access token returned by `POST /v1/auth/token`.

````